17 class BoundarySimplifyVertex
21 BoundarySimplifyVertex() : m_vertex(
nullptr), m_inSmallEdge(
nullptr), m_outSmallEdge(
nullptr) {}
23 BoundarySimplifyVertex(BoundaryEdge* inSmallEdge, BoundaryVertex* vertex, BoundaryEdge* outSmallEdge)
25 m_pos.x = (
KyFloat32)vertex->m_exclBoundaryPos.x;
26 m_pos.y = (
KyFloat32)vertex->m_exclBoundaryPos.y;
27 m_pos.z = vertex->m_altitude;
29 m_inSmallEdge = inSmallEdge;
30 m_outSmallEdge = outSmallEdge;
35 BoundaryVertex* m_vertex;
36 BoundaryEdge* m_inSmallEdge;
37 BoundaryEdge* m_outSmallEdge;
40 typedef SharedPoolList<BoundarySimplifyVertex>::NodePool BoundaryVertexPool;
41 typedef SharedPoolList<BoundarySimplifyVertex> BoundaryVertexList;
42 typedef SharedPoolList<BoundarySimplifyVertex>::Iterator BoundaryVertexListIterator;
43 typedef SharedPoolList<BoundarySimplifyVertex>::ConstIterator BoundaryVertexListConstIterator;
46 class BoundarySimplifyPolyline
50 typedef BoundarySimplifyVertex Vertex;
53 BoundarySimplifyPolyline(BoundaryVertexPool* pool) : m_vertices(pool)
55 Init(
KyUInt32MAXVAL, ContourWinding_Unset, BoundaryEdgeType_Unset, PolylineCycleStatus_Unset);
58 void Init(
KyUInt32 index, ContourWinding contourWinding, BoundaryEdgeType edgeType, BoundaryPolylineCycleStatus cycle)
61 m_contourWinding = contourWinding;
62 m_edgeType = edgeType;
64 m_cycleStatus = cycle;
68 void AddVertex(BoundaryEdge* inEdge, BoundaryVertex* vertex, BoundaryEdge* outEdge)
70 BoundarySimplifyVertex simplifyVertex(inEdge, vertex, outEdge);
71 m_vertices.PushBack(simplifyVertex);
74 PutEdgeInPolyline(inEdge);
77 PutEdgeInPolyline(outEdge);
80 void PutEdgeInPolyline(BoundaryEdge* edge)
82 edge->m_simplifyPolyline =
this;
83 edge->m_simplifyPolylineOrder = BoundaryOrder_Straight;
87 edge->m_pair->m_simplifyPolyline =
this;
88 edge->m_pair->m_simplifyPolylineOrder = BoundaryOrder_Reverse;
94 BoundaryVertexList m_vertices;
95 ContourWinding m_contourWinding;
96 BoundaryEdgeType m_edgeType;
97 BoundaryPolylineCycleStatus m_cycleStatus;
98 BoundarySimplifyPolyline* m_next;
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
#define KyUInt32MAXVAL
KyUInt32 max value
Definition: types.h:68
float KyFloat32
float
Definition: types.h:32