gwnavgeneration/boundary/boundarysimplifiedpolygon.h Source File

boundarysimplifiedpolygon.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 
12 
13 namespace Kaim
14 {
15 
16 class BoundaryEdge;
17 class BoundaryVertex;
18 class BoundarySimplifiedContour;
19 class BoundarySimplifiedEdge;
20 class DynamicNavHalfEdge;
21 
22 class BoundarySimplifiedPolygon
23 {
24  KY_DEFINE_NEW_DELETE_OPERATORS(Stat_Default_Mem)
25 public:
26  BoundarySimplifiedPolygon() : m_leftColor(PixelColor_Unset) {}
27 
28 public:
29  PixelColor m_leftColor;
30  KyArrayTLS_POD<BoundarySimplifiedContour*> m_simplifiedContours;
31 };
32 
33 class BoundarySimplifiedContour
34 {
35  KY_DEFINE_NEW_DELETE_OPERATORS(Stat_Default_Mem)
36 public:
37  BoundarySimplifiedContour();
38 
39  void Init(KyUInt32 index, PixelColor leftColor, KyUInt32 leftNavTagIdx, BoundarySimplifiedPolygon* polygon);
40  void PushEdge(BoundarySimplifiedEdge* edge);
41 
42 public:
43  KyUInt32 m_index;
44  KyUInt32 m_edgeCount;
45  BoundarySimplifiedEdge* m_begin;
46  BoundarySimplifiedEdge* m_last;
47  ContourWinding m_winding;
48  PixelColor m_leftColor;
49  KyUInt32 m_leftConnexIdx;
50  BoundarySimplifiedPolygon* m_polygon;
51 };
52 
53 
54 class BoundarySimplifiedEdge
55 {
56  KY_DEFINE_NEW_DELETE_OPERATORS(Stat_Default_Mem)
57 public:
58  enum BoundarySimplifiedEdge_Status
59  {
60  BoundarySimplifiedEdge_ACTIVE,
61  BoundarySimplifiedEdge_DISCARDED
62  };
63 
64  BoundarySimplifiedEdge();
65 
66  void Init(KyUInt32 index, BoundaryEdge* firstEdge, BoundaryEdge* lastEdge, BoundarySimplifiedContour* contour);
67 
68 public:
69  KyUInt32 m_index;
70  BoundaryEdgeType m_edgeType;
71  BoundaryEdge* m_firstEdge;
72  BoundaryEdge* m_lastEdge;
73  BoundaryVertex* m_vertex[2];
74  PixelColor m_leftColor;
75  KyUInt32 m_leftNavTagIdx;
76  BoundarySimplifiedContour* m_contour;
77  BoundarySimplifiedEdge* m_pair;
78  BoundarySimplifiedEdge* m_next;
79  KyFloat32 m_accumulatedInteriorPixelError;
80  KyFloat32 m_accumulatedExteriorPixelError;
81  KyFloat32 m_accumulatedSurfaceError;
82  BoundarySimplifiedEdge_Status m_status;
83  KyUInt32 m_edgeIdxInDynNavFloor;
84 };
85 
86 
87 }
88 
89 
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
float KyFloat32
float
Definition: types.h:32