gwnavruntime/dynamicnavmesh/rawedgeextractor.h Source File

rawedgeextractor.h
Go to the documentation of this file.
1 /*
2 * Copyright 2015 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 #ifndef Navigation_RawEdgeExtractor_H
8 #define Navigation_RawEdgeExtractor_H
9 
10 // primary contact: LASI - secondary contact: NONE
11 
16 
17 namespace Kaim
18 {
19 
20 class WorkingMemory;
21 class DynamicNavMeshQuery;
22 template <class T>
23 class WorkingMemArray;
24 class WorkingMemBitField;
25 class NavFloorBlob;
26 class NavVertex;
27 
28 class RawEdgeExtractor
29 {
30  KY_DEFINE_NEW_DELETE_OPERATORS(Stat_Default_Mem)
31 public:
32  RawEdgeExtractor(DynamicNavMeshQuery* query) :
33  m_query(query) {}
34 
35 public:
36  KyResult AssignTagVolumesToCurrentFloor(WorkingMemory* workingMemory);
37  KyResult ExtractSortedNavtags(WorkingMemory* workingMemory);
38  KyResult ExtractCurrentTagVolumeContour(WorkingMemory* workingMemory);
39  KyResult ExtractNavFloorContoursAndSortAllInputEdge(WorkingMemory* workingMemory);
40 
41 private:
42  KyResult FindHoleContour(WorkingMemory* workingMemory, NavHalfEdgeIdx firstHalfEdgeIdxOfContour,
43  WorkingMemArray<NavHalfEdgeIdx>& edgeIndiceOfContour, WorkingMemBitField& relevantClippingEdges, WorkingMemBitField& obstacleEdgesInHoles);
44 
45  KyResult FindConnexContour(WorkingMemory* workingMemory, NavHalfEdgeIdx firstHalfEdgeIdxOfContour,
46  WorkingMemArray<NavHalfEdgeIdx>& edgeIndiceOfContour, WorkingMemBitField& relevantClippingEdges);
47 
48  KyResult FindFullyInsideConnexContour(WorkingMemory* workingMemory, NavHalfEdgeIdx firstHalfEdgeIdxOfContour
49  , WorkingMemArray<NavHalfEdgeIdx>& edgeIndiceOfContour, WorkingMemBitField& relevantClippingEdges);
50 
51  PolygonWinding ComputeWinding(const WorkingMemArray<NavHalfEdgeIdx>& edgeIndiceOfContour, KyUInt32 lowerLeftStarEdgeIdxInContour,
52  const KyUInt32 contourEdgeCount, const NavVertex& lowerLeftPos, const NavFloorBlob* staticFloorBlob);
53 
54  void SetInputEdge(WorkingMemArray<InputEdge>& rawInputEdges, KyUInt32 inputEdgeIdx, KyUInt32 ownerIdx, KyUInt32 edgeOrigin,
55  KyUInt32 navTagIdx, const Vec2i& coordStart, const Vec2i& coordEnd, KyUInt32 stitch1To1EdgeIdx = KyUInt32MAXVAL);
56 
57 private:
58  // input
59  DynamicNavMeshQuery* m_query;
60 
61  KyUInt32 m_currentConnexContourIdx;
62  KyUInt32 m_currentHoleContourIdx;
63 };
64 
65 }
66 
67 #endif //Navigation_RawEdgeExtractor_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
KyUInt32 NavHalfEdgeIdx
An index that uniquely identifies a single edge of a triangle within the set of edges owned by a NavF...
Definition: navmeshtypes.h:87
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
#define KyUInt32MAXVAL
The maximum value that can be stored in the KyUInt32 variable type.
Definition: types.h:226