9 #ifndef Navigation_QueryDynamicOutput_H
10 #define Navigation_QueryDynamicOutput_H
42 class QueryOutputBuffer_Impl
45 QueryOutputBuffer_Impl() : m_buffer(
KY_NULL), m_count(0) {}
47 void InitBuffer(
KyUInt32 count,
char*& memory);
51 void Set(
KyUInt32 index,
const T&
object);
60 class QueryDynamicOutput
75 KyUInt32 m_costMultiplierSubSegmentCount;
76 KyUInt32 m_halfEdgeIntersectionCount;
83 KyUInt32 GetNavFloorPtrCount()
const;
84 KyUInt32 GetNavTrianglePtrCount()
const;
85 KyUInt32 GetNavTagSubSegmentCount()
const;
86 KyUInt32 GetCostMultiplierSubSegmentCount()
const;
87 KyUInt32 GetHalfEdgeIntersectionCount()
const;
88 KyUInt32 GetSpatializedPointCount()
const;
106 const Ptr<SpatializedPoint>& GetSpatializedPoint(
KyUInt32 spatializedPointIndex)
const;
107 Ptr<SpatializedPoint>& GetSpatializedPoint(
KyUInt32 spatializedPointIndex);
109 const Ptr<TagVolume>& GetTagVolume(
KyUInt32 tagVolumeIdx)
const;
110 Ptr<TagVolume>& GetTagVolume(
KyUInt32 tagVolumeIdx);
117 void SetSpatializedPoint (
KyUInt32 spatializedPointIndex,
const Ptr<SpatializedPoint>& spatializedPoint);
118 void SetTagVolume (
KyUInt32 tagVolumeIndex,
const Ptr<TagVolume>& tagVolume);
120 static KyUInt32 ComputeByteSize(
const Config& config);
121 static Ptr<QueryDynamicOutput> Create(
const Config& config);
124 bool IsEnoughMemoryForStoringDynamicOutput(
const Config& config);
125 void InitBuffers(
const Config& config);
127 bool IsEmpty()
const;
130 QueryOutputBuffer_Impl<NavFloorPtr > m_navFloorPtrs;
131 QueryOutputBuffer_Impl<NavTrianglePtr > m_navTrianglePtrs;
132 QueryOutputBuffer_Impl<NavTagSubSegment > m_navTagSubSegments;
133 QueryOutputBuffer_Impl<HalfEdgeIntersection > m_halfEgdeIntersections;
134 QueryOutputBuffer_Impl<CostMultiplierSubSegment> m_costMultSubSegments;
135 QueryOutputBuffer_Impl<Ptr<SpatializedPoint> > m_spatializedPoints;
136 QueryOutputBuffer_Impl<Ptr<TagVolume> > m_tagVolumes;
144 KY_INLINE
void AddRef() { RefCount ++; }
145 KY_INLINE
void Release()
155 int GetRefCount()
const {
return RefCount; }
158 class ScopedDynamicOutput
161 ScopedDynamicOutput(Ptr<QueryDynamicOutput>& dynamicOutput);
162 ~ScopedDynamicOutput();
167 void CopyCrossedDataIntoDynamicOutput();
169 Ptr<QueryDynamicOutput>* m_queryDynamicOutput;
171 WorkingMemArray<NavFloorRawPtr> m_navFloorRawPtrs;
172 WorkingMemArray<NavTriangleRawPtr> m_navTriangleRawPtrs;
173 WorkingMemArray<RawNavTagSubSegment> m_rawNavTagSubSegments;
174 WorkingMemArray<CostMultiplierSubSegment> m_costMultiplierSubSegments;
175 WorkingMemArray<RawHalfEdgeIntersection> m_rawHalfEdgeIntersections;
176 WorkingMemArray<SpatializedPoint*> m_spatializedPoints;
177 WorkingMemArray<TagVolume*> m_tagVolumes;
186 #endif //Navigation_QueryDynamicOutput_H
This class gather the data encountered along some query process.
Definition: querydynamicoutput.h:61
Each instance of this class uniquely identifies a single NavFloor.
Definition: navfloorptr.h:21
KyInt32 KyResult
Defines a type that can be returned by methods or functions in the Gameware Navigation SDK to indicat...
Definition: types.h:254
This class represents a NavTag sub-segment of a ray (within a RayCastQuery or a RayCanGoQuery, carried out against the NavMesh).
Definition: navtagsubsegment.h:52
#define KY_NULL
Null value.
Definition: types.h:247
DynamicOutputMode
Enumerates possible ways of storing crossed data from a query in a QueryDynamicOutput object...
Definition: querydynamicoutput.h:26
Indicates that QueryDynamicOutput will be used to store CostMultiplierSubSegment. ...
Definition: querydynamicoutput.h:34
Definition: gamekitcrowddispersion.h:20
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
Indicates that QueryDynamicOutput will not be used to store anything.
Definition: querydynamicoutput.h:28
This class represents a CostMultiplier sub-segment of a ray (within a RayCastQuery or a RayCanGoQuery...
Definition: costmultipliersubsegment.h:25
Indicates that QueryDynamicOutput will be used to store Vec3f.
Definition: querydynamicoutput.h:32
Indicates that QueryDynamicOutput will be used to store NavFloorTrianglePtr.
Definition: querydynamicoutput.h:30
Each instance of this class uniquely identifies a single NavTriangle in a NavFloor.
Definition: navtriangleptr.h:22
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
Indicates that QueryDynamicOutput will be used to store NavTagSubSegment.
Definition: querydynamicoutput.h:31
Indicates that QueryDynamicOutput will be used to store CostMultiplierSubSegment. ...
Definition: querydynamicoutput.h:35
Indicates that QueryDynamicOutput will be used to store CostMultiplierSubSegment. ...
Definition: querydynamicoutput.h:33
This class represents an intersection between an NavHalfEdge and a ray (within a RayCastQuery or a Ra...
Definition: halfedgeintersection.h:44
Indicates that QueryDynamicOutput will be used to store NavFloorPtr.
Definition: querydynamicoutput.h:29