Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #include <grid_map_core/GridMapMath.hpp>
00010 #include <grid_map_core/SubmapGeometry.hpp>
00011
00012 namespace grid_map {
00013
00014 SubmapGeometry::SubmapGeometry(const GridMap& gridMap, const Position& position,
00015 const Length& length, bool& isSuccess)
00016 : gridMap_(gridMap)
00017 {
00018 isSuccess = getSubmapInformation(startIndex_, size_, position_, length_,
00019 requestedIndexInSubmap_, position, length, gridMap_.getLength(),
00020 gridMap_.getPosition(), gridMap_.getResolution(),
00021 gridMap_.getSize(), gridMap_.getStartIndex());
00022 }
00023
00024 SubmapGeometry::~SubmapGeometry()
00025 {
00026 }
00027
00028 const GridMap& SubmapGeometry::getGridMap() const
00029 {
00030 return gridMap_;
00031 }
00032
00033 const Length& SubmapGeometry::getLength() const
00034 {
00035 return length_;
00036 }
00037
00038 const Position& SubmapGeometry::getPosition() const
00039 {
00040 return position_;
00041 }
00042
00043 const Index& SubmapGeometry::getRequestedIndexInSubmap() const
00044 {
00045 return requestedIndexInSubmap_;
00046 }
00047
00048 const Size& SubmapGeometry::getSize() const
00049 {
00050 return size_;
00051 }
00052
00053 double SubmapGeometry::getResolution() const
00054 {
00055 return gridMap_.getResolution();
00056 }
00057
00058 const Index& SubmapGeometry::getStartIndex() const
00059 {
00060 return startIndex_;
00061 }
00062
00063 }