gwnavruntime/navmesh/celldesc.h Source File

celldesc.h
Go to the documentation of this file.
1 /*
2 * Copyright 2015 Autodesk, Inc. All rights reserved.
3 * Use of this software is subject to the terms of the Autodesk license agreement and any attachments or Appendices thereto provided at the time of installation or download,
4 * or which otherwise accompanies this software in either electronic or hard copy form, or which is signed by you and accepted by Autodesk.
5 */
6 
7 
8 // primary contact: GUAL - secondary contact: NOBODY
9 #ifndef Navigation_CellDesc_H
10 #define Navigation_CellDesc_H
11 
12 
15 
16 
17 namespace Kaim
18 {
19 
20 class PixelAndCellGrid;
21 
22 
23 class CellDesc
24 {
25  KY_DEFINE_NEW_DELETE_OPERATORS(Stat_Default_Mem)
26 public:
27  void Init(const PixelAndCellGrid& pixelAndCellGrid, const CellPos& cellPos, KyFloat32 rasterPrecision);
28  bool operator==(const CellDesc& other) const;
29 
30 public:
31  CellPos m_cellPos;
32  PixelBox m_exclusivePixelBox;
33  PixelBox m_enlargedPixelBox;
34  CoordBox m_exclusiveCoordBox;
35  CoordBox m_enlargedCoordBox;
36  Box2f m_box2f;
37 };
38 inline void SwapEndianness(Endianness::Target e, CellDesc& self)
39 {
40  SwapEndianness(e, self.m_cellPos);
41  SwapEndianness(e, self.m_exclusivePixelBox);
42  SwapEndianness(e, self.m_enlargedPixelBox);
43  SwapEndianness(e, self.m_exclusiveCoordBox);
44  SwapEndianness(e, self.m_enlargedCoordBox);
45  SwapEndianness(e, self.m_box2f);
46 }
47 
48 
49 }
50 
51 
52 #endif
Vec2i CellPos
A type that represents the position of a cell within a 2D grid.
Definition: navmeshtypes.h:33
Box2i CoordBox
A type that represents a bounding box in the integer 2D grid.
Definition: navmeshtypes.h:24
Definition: gamekitcrowddispersion.h:20
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43