7 #ifndef KAIM_EDGE_INTERSECTOR_H
8 #define KAIM_EDGE_INTERSECTOR_H
24 class ScopedDisplayList;
27 class WorkingMemBitField;
29 class WorkingMemArray;
46 EdgeIntersector() : m_debugDisplayListBeforeSnap(
KY_NULL), m_debugDisplayListAfterSnap(KY_NULL){}
48 KyResult ComputeIntersections(WorkingMemory* workingMemory);
50 static bool Intersects_grid_rounded(
const Vec2i& hotPoint,
const Vec2i& start,
const Vec2i& end);
52 KyResult ComputeIntersections_Pass1(WorkingMemory* workingMemory,
const WorkingMemArray<InputEdge>& rawEdges,
53 const WorkingMemArray<Box2i>& edgeBoundingBoxes, WorkingMemArray<Vec2i>& points);
55 void ComputeIntersections_Pass2(
const WorkingMemArray<InputEdge>& rawEdges,
56 const WorkingMemArray<Box2i>& edgeBoundingBoxes,
const WorkingMemArray<Vec2i>& points);
58 void ComputeIntersectionsOuputEdgePieces(
const WorkingMemArray<InputEdge>& rawEdges,
59 const WorkingMemArray<Vec2i>& points, KyArray<InputEdgePiece>& intersectedEdges);
61 void InitEdges(
const KyArray<InputEdge>& rawEdges);
63 void ComputeBoundingBoxesOfInputEdges(
const WorkingMemArray<InputEdge>& rawEdges, WorkingMemArray<Box2i>& edgeBoundingBoxes);
65 void ComputeBoundingBoxesIntersection(
const WorkingMemArray<InputEdge>& rawEdges,
const WorkingMemArray<Box2i>& edgeBoundingBoxes,
66 WorkingMemBitField& boxIntersect);
68 KyResult SortHotPointAndRemoveDuplicate(WorkingMemory* workingMemory,
const WorkingMemArray<InputEdge>& rawEdges,
69 WorkingMemArray<IndexedPos>& hotPoints, WorkingMemArray<Vec2i>& uniqueHotPoints);
71 void SortCutList(
const WorkingMemArray<InputEdge>& rawEdges,
const WorkingMemArray<Vec2i>& points);
73 KyArray<KyArray<KyUInt32> > m_cuts;
76 void IntersectionsToDisplayList(
const WorkingMemArray<InputEdge>& rawEdges,
const WorkingMemArray<Vec2i>& hotPoints,
80 KyResult CheckResult(
const WorkingMemArray<InputEdge>& rawEdges,
const WorkingMemArray<Vec2i>& hotPoints, ScopedDisplayList* displayList);
83 void SetDebugDisplayLists(
KyFloat32 rasterPrecision,
const Vec2i& cellOffset, ScopedDisplayList* displayListBeforeSnap, ScopedDisplayList* displayListAfterSnap);
85 ScopedDisplayList* m_debugDisplayListBeforeSnap;
86 ScopedDisplayList* m_debugDisplayListAfterSnap;
96 #endif // KAIM_EDGE_INTERSECTOR_H
KyInt32 KyResult
Defines a type that can be returned by methods or functions in the Gameware Navigation SDK to indicat...
Definition: types.h:254
#define KY_NULL
Null value.
Definition: types.h:247
Definition: gamekitcrowddispersion.h:20
static const VisualColor White
Represents the color with RGBA values (255, 255, 255, 255).
Definition: visualcolor.h:234
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43