9 #ifndef GwNavGen_BoundaryGraphBlob_H
10 #define GwNavGen_BoundaryGraphBlob_H
28 class BoundaryGraphBlobVertex
32 BoundaryPos m_boundaryPos;
36 BoundaryVertexStaticStatus m_staticStatus;
39 inline
void SwapEndianness(Endianness::Target e, BoundaryGraphBlobVertex& self)
41 SwapEndianness(e,
self.m_boundaryPos);
42 SwapEndianness(e,
self.m_altitude);
45 SwapEndianness(e,
self.m_ins[i]);
48 SwapEndianness(e,
self.m_outs[i]);
50 SwapEndianness(e,
self.m_staticStatus);
51 SwapEndianness(e,
self.m_index);
55 class BoundaryGraphBlobSimplifyPolyline
62 inline
void SwapEndianness(Endianness::Target e, BoundaryGraphBlobSimplifyPolyline& self)
64 SwapEndianness(e,
self.m_cycle);
65 SwapEndianness(e,
self.m_vertices);
69 class BoundaryGraphBlobEdge
73 void SetBoundaryEdgeType(BoundaryEdgeType type) { m_type = (
KyUInt32)type; }
74 BoundaryEdgeType GetBoundaryEdgeType()
const {
return (BoundaryEdgeType)m_type; }
86 SwapEndianness(e,
self.m_dir);
87 SwapEndianness(e,
self.m_type);
88 SwapEndianness(e,
self.m_vertex[0]);
89 SwapEndianness(e,
self.m_vertex[1]);
90 SwapEndianness(e,
self.m_next);
91 SwapEndianness(e,
self.m_pair);
92 SwapEndianness(e,
self.m_index);
96 class BoundaryGraphBlobContour
102 ContourWinding m_type;
103 PixelColor m_leftColor;
106 inline
void SwapEndianness(Endianness::Target e, BoundaryGraphBlobContour& self)
108 SwapEndianness(e,
self.m_edgeCount);
109 SwapEndianness(e,
self.m_begin);
110 SwapEndianness(e,
self.m_type);
111 SwapEndianness(e,
self.m_leftColor);
112 SwapEndianness(e,
self.m_index);
116 class BoundaryGraphBlobPolygon
120 PixelColor m_leftColor;
123 inline
void SwapEndianness(Endianness::Target e, BoundaryGraphBlobPolygon& self)
125 SwapEndianness(e,
self.m_leftColor);
126 SwapEndianness(e,
self.m_contours);
130 class BoundaryGraphBlobSimplifiedHalfEdge
135 void SetBoundaryEdgeType(BoundaryEdgeType type) { m_type = (
KyUInt32)type; }
136 BoundaryEdgeType GetBoundaryEdgeType()
const {
return (BoundaryEdgeType)m_type; }
145 inline void SwapEndianness(
Endianness::Target e, BoundaryGraphBlobSimplifiedHalfEdge&
self)
147 SwapEndianness(e,
self.m_type);
148 SwapEndianness(e,
self.m_vertex[0]);
149 SwapEndianness(e,
self.m_vertex[1]);
150 SwapEndianness(e,
self.m_next);
151 SwapEndianness(e,
self.m_pair);
152 SwapEndianness(e,
self.m_index);
156 class BoundaryGraphBlobSimplifiedContour
162 ContourWinding m_winding;
163 PixelColor m_leftColor;
166 inline
void SwapEndianness(Endianness::Target e, BoundaryGraphBlobSimplifiedContour& self)
168 SwapEndianness(e,
self.m_edgeCount);
169 SwapEndianness(e,
self.m_begin);
170 SwapEndianness(e,
self.m_winding);
171 SwapEndianness(e,
self.m_leftColor);
172 SwapEndianness(e,
self.m_index);
176 class BoundaryGraphBlobSimplifiedPolygon
180 PixelColor m_leftColor;
181 BlobArray<
KyUInt32> m_simplifiedContours;
183 inline
void SwapEndianness(Endianness::Target e, BoundaryGraphBlobSimplifiedPolygon& self)
185 SwapEndianness(e,
self.m_leftColor);
186 SwapEndianness(e,
self.m_simplifiedContours);
190 class BoundaryGraphBlob
193 KY_ROOT_BLOB_CLASS(Generator, BoundaryGraphBlob, 2)
196 typedef BoundaryGraphBlobVertex Vertex;
197 typedef BoundaryGraphBlobEdge Edge;
198 typedef BoundaryGraphBlobContour Contour;
199 typedef BoundaryGraphBlobPolygon Polygon;
200 typedef BoundaryGraphBlobSimplifyPolyline SimplifyPolyline;
202 typedef BoundaryGraphBlobSimplifiedHalfEdge SimplifiedHalfEdge;
203 typedef BoundaryGraphBlobSimplifiedContour SimplifiedContour;
204 typedef BoundaryGraphBlobSimplifiedPolygon SimplifiedPolygon;
208 PixelAndCellGrid m_pixelAndCellGrid;
210 BlobArray<Vertex> m_vertices;
211 BlobArray<Edge> m_edges;
212 BlobArray<Contour> m_contours;
213 BlobArray<Polygon> m_polygons;
214 BlobArray<SimplifyPolyline> m_simplifyPolylines;
215 BlobArray<SimplifiedHalfEdge> m_simplifiedEdges;
216 BlobArray<SimplifiedContour> m_simplifiedContours;
217 BlobArray<SimplifiedPolygon> m_simplifiedPolygons;
219 inline
void SwapEndianness(Endianness::Target e, BoundaryGraphBlob& self)
221 SwapEndianness(e,
self.m_rasterPrecision);
222 SwapEndianness(e,
self.m_pixelAndCellGrid);
223 SwapEndianness(e,
self.m_cellDesc);
224 SwapEndianness(e,
self.m_vertices);
225 SwapEndianness(e,
self.m_edges);
226 SwapEndianness(e,
self.m_contours);
227 SwapEndianness(e,
self.m_polygons);
228 SwapEndianness(e,
self.m_simplifyPolylines);
229 SwapEndianness(e,
self.m_simplifiedEdges);
230 SwapEndianness(e,
self.m_simplifiedContours);
231 SwapEndianness(e,
self.m_simplifiedPolygons);
KyUInt32 CardinalDir
Defines a type that refers to one of the cardinal points on the compass:
Definition: cardinaldir.h:23
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:35
Definition: gamekitcrowddispersion.h:20
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43