Go to the documentation of this file.
20 #ifndef __OpenKarto_Grid_h__
21 #define __OpenKarto_Grid_h__
70 Grid* pGrid =
new Grid(width, height);
121 m_WidthStep = math::AlignValue<kt_int32s>(width, 8);
171 if (boundaryCheck ==
true)
176 errorMessage <<
"Index (" << rGrid.
GetX() <<
", " << rGrid.
GetY() <<
")" <<
" out of range. Index must be between [0; " <<
GetWidth() <<
") and [0; " <<
GetHeight() <<
")";
183 if (boundaryCheck ==
true)
373 kt_bool steep = abs(y1 - y0) > abs(x1 - x0);
417 if (2 * error >= deltaX)
428 pGridPointer[index]++;
492 #endif // __OpenKarto_Grid_h__
const String & ToString() const
kt_int32s GetWidthStep() const
void SetSize(const Size2< kt_int32s > &rSize)
Vector2i WorldToGrid(const Vector2d &rWorld, kt_bool flipY=false) const
Vector2d GridToWorld(const Vector2i &rGrid, kt_bool flipY=false) const
kt_double GetResolution() const
KARTO_TYPE(Grid< kt_int8u >)
void SetScale(kt_double scale)
virtual void Resize(kt_int32s width, kt_int32s height)
T GetValue(const Vector2i &rGrid) const
void TraceLine(kt_int32s x0, kt_int32s y0, kt_int32s x1, kt_int32s y1, Functor *f=NULL)
Grid(kt_int32s width, kt_int32s height)
BoundingBox2 GetBoundingBox() const
T * GetDataPointer(const Vector2i &rGrid)
virtual kt_int32s GridIndex(const Vector2i &rGrid, kt_bool boundaryCheck=true) const
CoordinateConverter * GetCoordinateConverter() const
static Grid * CreateGrid(kt_int32s width, kt_int32s height, kt_double resolution)
const Size2< kt_int32s > GetSize() const
kt_double GetResolution() const
void SetOffset(const Vector2d &rOffset)
kt_int32s GetWidth() const
Vector2i WorldToGrid(const Vector2d &rWorld, kt_bool flipY=false) const
Vector2d GridToWorld(const Vector2i &rGrid, kt_bool flipY=false) const
void SetValue(const Vector2i &rGrid, T rValue) const
kt_bool IsValidGridIndex(const Vector2i &rGrid) const
kt_int32s GetDataSize() const
const Grid & operator=(const Grid &)
T * GetDataPointer(const Vector2i &rGrid) const
Vector2i IndexToGrid(kt_int32s index) const
kt_bool IsUpTo(const T &value, const T &maximum)
T * GetDataPointer() const
CoordinateConverter * m_pCoordinateConverter
BoundingBox2 GetBoundingBox() const
kt_int32s GetHeight() const
nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Wed Mar 2 2022 00:37:22