9 #ifndef Navigation_NavMeshTypes_H
10 #define Navigation_NavMeshTypes_H
41 POLYGON_UNKNOWN_WINDING,
72 typedef KyUInt16 CompactNavVertexIdx;
73 static const CompactNavVertexIdx CompactNavVertexIdx_MAXVAL = 0x0FFF;
79 KY_INLINE
bool IsNavVertexIdxValid(
const NavVertexIdx idx) {
return idx <
NavVertexIdx_Invalid; }
84 typedef KyUInt16 CompactNavHalfEdgeIdx;
85 static const CompactNavHalfEdgeIdx CompactNavHalfEdgeIdx_MAXVAL = 0x3FFF;
97 typedef KyUInt16 CompactNavTriangleIdx;
98 static const CompactNavTriangleIdx CompactNavTriangleIdx_MAXVAL = 0xFFFF;
107 typedef KyUInt16 CompactNavConnexIdx;
108 static const CompactNavConnexIdx CompactNavConnexIdx_MAXVAL = 0xFFFF;
131 typedef KyUInt32 CellIdxInActiveData;
132 static const CellIdxInActiveData CellIdxInActiveData_Invalid = 0x0FFFFFFF;
136 typedef KyUInt32 ConnectedComponentId;
137 static const ConnectedComponentId ConnectedComponent_UNDEFINED =
KyUInt32MAXVAL;
138 static const ConnectedComponentId ConnectedComponent_TRAVERSALOPEN =
KyUInt32MAXVAL - 1;
140 #define KY_DEFINE_TEMPLATE_MASK_MANIPULATOR(integerType) \
141 template<int BitIdx> KY_INLINE void SetBitInMask(integerType& mask) { mask |= (1 << (integerType)BitIdx); } \
142 template<int BitIdx> KY_INLINE void UnSetBitInMask(integerType& mask) { mask &= ~(1 << (integerType)BitIdx); } \
143 template<int BitIdx> KY_INLINE bool IsBitSetInMask(integerType mask) { return (mask & (1 << (integerType)BitIdx)) != 0; } \
145 KY_DEFINE_TEMPLATE_MASK_MANIPULATOR(
KyUInt8)
146 KY_DEFINE_TEMPLATE_MASK_MANIPULATOR(
KyUInt16)
147 KY_DEFINE_TEMPLATE_MASK_MANIPULATOR(
KyUInt32)
bool IsNavTriangleIdxValid(const NavTriangleIdx idx)
Indicates whether or not the specified NavTriangleIdx is valid.
Definition: navmeshtypes.h:104
KyUInt32 NavTriangleIdx
An index that uniquely identifies a single triangle within the set of triangles owned by a NavFloor...
Definition: navmeshtypes.h:100
KyUInt32 NavConnexIdx
An index that uniquely identifies a single triangle within the set of triangles owned by a NavFloor...
Definition: navmeshtypes.h:110
static const KyInt32 InvalidPixelCoord
Represents an invalidPixelCoord object.
Definition: navmeshtypes.h:30
static const CardinalDir CardinalDir_NORTH
Identifies North, defined as the positive direction of the Y axis.
Definition: cardinaldir.h:26
static const NavVertexIdx NavVertexIdx_Invalid
Represents an invalid NavVertexIdx.
Definition: navmeshtypes.h:76
This class represents a two-dimensional axis-aligned bounding box whose dimensions are stored using 3...
Definition: box2i.h:119
Box2i CellBox
A type that represents a bounding box around cells in a 2D grid.
Definition: navmeshtypes.h:34
Vec2i CellPos
A type that represents the position of a cell within a 2D grid.
Definition: navmeshtypes.h:33
Indicates that the obstacle represents a wall.
Definition: navmeshtypes.h:47
static const KyInt32 InvalidCoord
Represents an invalidCoord object.
Definition: navmeshtypes.h:25
Box2LL CoordBox64
A type that represents a bounding box in the integer 2D grid.
Definition: navmeshtypes.h:20
static const NavConnexIdx NavConnexIdx_Invalid
Represents an invalid NavConnexIdx.
Definition: navmeshtypes.h:111
KyUInt32 NavHalfEdgeIdx
An index that uniquely identifies a single edge of a triangle within the set of edges owned by a NavF...
Definition: navmeshtypes.h:87
Box2i CoordBox
A type that represents a bounding box in the integer 2D grid.
Definition: navmeshtypes.h:24
static const NavFloorIdx NavFloorIdx_Invalid
Represents an invalid NavFloorIdx.
Definition: navmeshtypes.h:116
int KyInt32
Type used internally to represent a 32-bit integer.
Definition: types.h:35
bool IsNavCellIdxValid(const NavCellIdx idx)
Indicates whether or not the specified NavCellIdx is valid.
Definition: navmeshtypes.h:127
Indicates that another NavHalfEdge in the same NavFloor but in different Connex lies adjacent to the ...
Definition: navmeshtypes.h:60
static const KyInt32 InvalidCellCoord
Represents an invalidCellCoord object.
Definition: navmeshtypes.h:35
This class defines a two-dimensional vector whose coordinates are stored using 64-bit integers...
Definition: vec2ll.h:27
Vec2i CoordPos
A type that represents the position of a point within the 2D integer grid.
Definition: navmeshtypes.h:23
KyUInt32 NavCellIdx
An index that uniquely identifies a single NavCell within the set of NavCells owned by a NavMesh...
Definition: navmeshtypes.h:123
bool IsNavHalfEdgeIdxValid(const NavHalfEdgeIdx idx)
Indicates whether or not the specified NavHalfEdgeIdx is valid.
Definition: navmeshtypes.h:91
NavHalfEdgeObstacleType
Enumerates the possible types of obstacles that can be represented by a NavHalfEdge whose type is EDG...
Definition: navmeshtypes.h:45
static const CardinalDir CardinalDir_SOUTH
Identifies South, defined as the negative direction of the Y axis.
Definition: cardinaldir.h:28
static const CardinalDir CardinalDir_EAST
Identifies East, defined as the positive direction of the X axis.
Definition: cardinaldir.h:25
static const NavCellIdx NavCellIdx_Invalid
Represents an invalid NavCellIdx.
Definition: navmeshtypes.h:124
Indicates that this NavHalfEdge lies on the border of its NavFloor and its NavCell.
Definition: navmeshtypes.h:57
KyUInt32 NavFloorIdx
An index that uniquely identifies a single NavFloor within the set of NavFloors owned by a NavCell...
Definition: navmeshtypes.h:115
#define KyInt32MAXVAL
The maximum value that can be stored in the KyInt32 variable type.
Definition: types.h:224
static const CardinalDir CardinalDir_WEST
Identifies West, defined as the negative direction of the X axis.
Definition: cardinaldir.h:27
Indicates that this NavHalfEdge lies on the border of its NavFloor and its NavCell.
Definition: navmeshtypes.h:54
Vec2LL CoordPos64
A type that represents the position of a point within the 2D integer grid.
Definition: navmeshtypes.h:19
unsigned char KyUInt8
Type used internally to represent an unsigned 8-bit integer.
Definition: types.h:41
This class defines a two-dimensional vector whose coordinates are stored using 32-bit integers...
Definition: vec2i.h:26
Definition: gamekitcrowddispersion.h:20
Indicates that this NavHalfEdge lies on the border of its NavFloor.
Definition: navmeshtypes.h:58
Indicates that this NavHalfEdge lies on an external border of the NavMesh.
Definition: navmeshtypes.h:59
KyUInt32 NavVertexIdx
An index that uniquely identifies a single vertex of a triangle within the set of vertices owned by a...
Definition: navmeshtypes.h:75
Indicates that another NavHalfEdge in the same Connex lies adjacent to the NavHalfEdge.
Definition: navmeshtypes.h:61
unsigned short KyUInt16
Type used internally to represent an unsigned 16-bit integer.
Definition: types.h:40
NavHalfEdgeType
Enumerates the possible types of boundary that can be represented by a NavHalfEdge.
Definition: navmeshtypes.h:52
Indicates that this NavHalfEdge lies on the border of its NavFloor and its NavCell.
Definition: navmeshtypes.h:55
bool IsNavFloorIdxValid(const NavFloorIdx idx)
Indicates whether or not the specified NavFloorIdx is valid.
Definition: navmeshtypes.h:119
static const NavHalfEdgeIdx NavHalfEdgeIdx_Invalid
Represents an invalid NavHalfEdgeIdx.
Definition: navmeshtypes.h:88
static const NavTriangleIdx NavTriangleIdx_Invalid
Represents an invalid NavTriangleIdx.
Definition: navmeshtypes.h:101
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
KyInt32 CellCoord
A type that represents the placement of a cell on one axis of a 2D grid.
Definition: navmeshtypes.h:32
Indicates that this NavHalfEdge lies on the border of its NavFloor and its NavCell.
Definition: navmeshtypes.h:56
#define KyUInt32MAXVAL
The maximum value that can be stored in the KyUInt32 variable type.
Definition: types.h:226
Each instance of this class also maintains a count of the number of elements (or grid cells) containe...
Definition: box2ll.h:24
Indicates that the obstacle represents a hole or a cliff.
Definition: navmeshtypes.h:48