gwnavgeneration/boundary/boundarytypes.h Source File

boundarytypes.h
Go to the documentation of this file.
1 /*
2 * Copyright 2016 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 #pragma once
8 
10 
11 namespace Kaim
12 {
13  // world coordinates
14  typedef KyInt32 BoundaryCoord;
15  typedef Vec2i BoundaryPos;
16  typedef Box2i BoundaryBox;
17 
18  // relative to NavPixelBox
19  typedef KyInt32 NavBoundaryCoord;
20  typedef Vec2i NavBoundaryPos;
21 
22  // relative to NavPixelBox
23  typedef KyInt32 NavPixelCoord;
24  typedef Vec2i NavPixelPos;
25  typedef Vec3i NavPixelPos3d;
26 
27  // relative to exclusivePixelBox
28  typedef KyInt32 ExclBoundaryCoord;
29  typedef Vec2i ExclBoundaryPos;
30  typedef Vec3i ExclBoundaryVertexPos; // x and y are relative to exclusivePixelBox
31 
32  enum BoundaryEdgeType
33  {
34  BoundaryEdgeType_CellLink_East = 0,
35  BoundaryEdgeType_CellLink_North = 1,
36  BoundaryEdgeType_CellLink_West = 2,
37  BoundaryEdgeType_CellLink_South = 3,
38  BoundaryEdgeType_FloorLink = 4, //Represent the outer edges of a 2d floor
39  BoundaryEdgeType_ConnexLink = 5, //Represent and edge that separate 2 navTag in the same layer
40  BoundaryEdgeType_Wall = 6,
41  BoundaryEdgeType_Hole = 7,
42  BoundaryEdgeType_Unset = KyUInt32MAXVAL
43  };
44 
45  KY_INLINE bool IsBoundaryEdgeOnFloorOrCellLink(BoundaryEdgeType type) { return type < BoundaryEdgeType_ConnexLink; }
46 
47  typedef KyInt32 BoundaryVertexStaticStatus;
48  static const BoundaryVertexStaticStatus BoundaryVertexStaticStatus_Dynamic = 0;
49  static const BoundaryVertexStaticStatus BoundaryVertexStaticStatus_Static = 1;
50  static const BoundaryVertexStaticStatus BoundaryVertexStaticStatus_Narrow = 2;
51  static const BoundaryVertexStaticStatus BoundaryVertexStaticStatus_FeatureDiscontinuity = 3;
52 
53  typedef KyUInt32 BoundaryIsVisitedStatus;
54  static const BoundaryIsVisitedStatus BoundaryIsVisitedStatus_Unvisited = 0;
55  static const BoundaryIsVisitedStatus BoundaryIsVisitedStatus_Visited = 1;
56  static const BoundaryIsVisitedStatus BoundaryIsVisitedStatus_NoNeedToBeVisited = 2;
57 
58  typedef KyUInt32 BoundaryPolylineCycleStatus;
59  static const BoundaryPolylineCycleStatus PolylineCycleStatus_NotCycle = 0;
60  static const BoundaryPolylineCycleStatus PolylineCycleStatus_Cycle = 1;
61  static const BoundaryPolylineCycleStatus PolylineCycleStatus_Unset = KyUInt32MAXVAL;
62 
63  typedef KyUInt32 BoundarySide;
64  static const BoundarySide BoundarySide_Left = 0;
65  static const BoundarySide BoundarySide_Right = 1;
66  static const BoundarySide BoundarySide_Unset = KyUInt32MAXVAL;
67 
68  typedef KyUInt32 ContourWinding;
69  static const ContourWinding ContourWinding_CCW = 0;
70  static const ContourWinding ContourWinding_CW = 1;
71  static const ContourWinding ContourWinding_Unset = KyUInt32MAXVAL;
72 
73  typedef KyUInt32 BoundaryOrder;
74  static const BoundaryOrder BoundaryOrder_Straight = 0;
75  static const BoundaryOrder BoundaryOrder_Reverse = 1;
76  static const BoundaryOrder BoundaryOrder_Unset = KyUInt32MAXVAL;
77 }
78 
79 
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
std::int32_t KyInt32
int32_t
Definition: types.h:24
#define KyUInt32MAXVAL
KyUInt32 max value
Definition: types.h:68