10 #ifndef Navigation_NavFloor_H
11 #define Navigation_NavFloor_H
22 class DynamicNavFloor;
23 class NavHalfEdgeRawPtr;
24 class NavFloorToNavGraphLinks;
26 class SpatializedPoint;
28 class NavFloor1To1StitchData;
57 NavFloor* GetAssociatedStaticNavFloor() const;
58 bool IsStaticVersion() const;
60 const ConnectedComponentId& GetConnexConnectedComponentId(
KyUInt32 navConnexIdx) const;
61 void SetConnexConnectedComponentId(
KyUInt32 navConnexIdx, ConnectedComponentId connectedComponentId);
64 bool HasAnUnconnectedLink() const;
70 NavFloorToNavGraphLinks* GetNavFloorToNavGraphLinks() const;
80 NavFloor1To1StitchData* m_floor1To1StitchData;
84 static Ptr<NavFloor> Create(
const CreateConfig& navFloorCongig, MemoryHeap* pheap =
KY_NULL);
87 KyUInt32 GetIndexInCollection()
const;
88 void SetIndexInCollection(
KyUInt32 indexInCollection);
94 void RemoveAllSpatializedPoints();
96 void UnstitchStaticLinks();
98 static Ptr<NavFloor> PlaceNavFloorInBuffer(
const CreateConfig& navFloorCongig,
char*& currentMemoryPlace);
104 NavFloor1To1StitchData* m_floor1To1StitchData;
107 ConnectedComponentId* m_connexConnectedComponents;
118 KyUInt16 m_idxInActiveNavFloorCollection;
124 KY_DEBUG_ASSERTN(m_navFloorBlob !=
KY_NULL,(
"the SizedPtr is not valid"));
125 return m_navFloorBlob;
128 KY_INLINE
KyUInt32 NavFloor::GetIndexInCollection()
const {
return m_idxInActiveNavFloorCollection; }
129 KY_INLINE
void NavFloor::SetIndexInCollection(
KyUInt32 indexInCollection) { m_idxInActiveNavFloorCollection = (
KyUInt16)indexInCollection; }
135 KY_INLINE
const ConnectedComponentId& NavFloor::GetConnexConnectedComponentId(
KyUInt32 navConnexIdx)
const {
return m_connexConnectedComponents[navConnexIdx]; }
137 KY_INLINE NavHalfEdgeRawPtr* NavFloor::GetLinksBuffer()
const {
return (NavHalfEdgeRawPtr*)((
char*)
this + m_floorLinksOffset); }
138 KY_INLINE NavFloorToNavGraphLinks* NavFloor::GetNavFloorToNavGraphLinks()
const {
return (NavFloorToNavGraphLinks*)((
char*)
this + m_graphLinksOffset); }
140 KY_INLINE
bool NavFloor::HasAnUnconnectedLink()
const {
return m_numberOfUnconnectedLink != 0; }
142 KY_INLINE
void NavFloor::SetConnexConnectedComponentId(
KyUInt32 navConnexIdx, ConnectedComponentId connectedComponentId) { m_connexConnectedComponents[navConnexIdx] = connectedComponentId; }
145 KY_INLINE
void NavFloor::AddSpatializedPoint(
SpatializedPoint* spatializedPoint) { m_spatializedPoints.PushBack(spatializedPoint); }
146 KY_INLINE
void NavFloor::RemoveSpatializedPoint(
SpatializedPoint* spatializedPoint) { m_spatializedPoints.RemoveFirstOccurrence(spatializedPoint); }
148 KY_INLINE
bool NavFloor::IsStaticVersion()
const {
return GetAssociatedStaticNavFloor() ==
this; }
152 #endif //Navigation_NavFloor_H
Represents the range of altitudes covered by a single NavFloorBlob.
Definition: flooraltituderange.h:18
This class is a runtime wrapper of a NavFloorBlob, it gathers all the runtime information associated ...
Definition: navfloor.h:40
The NavFloorBlob contains a connected and not overlapping part of triangle mesh static data within a ...
Definition: navfloorblob.h:42
#define KY_REFCOUNT_MALLOC_FREE(ClassName)
Specific to RefCounting, no inheritance involved, used to make RefCount-able classes compatible with ...
Definition: memory.h:145
const NavFloorBlob * GetNavFloorBlob() const
Retrieves the NavFloorBlob that contains the static data for this NavFloor.
Definition: navfloor.h:134
Collection is a class which is a "Collection" of elements (not sorted, not unique) ...
Definition: collection.h:32
#define KY_NULL
Null value.
Definition: types.h:247
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:387
This class is a runtime wrapper of a NavCellBlob.
Definition: navcell.h:33
This class is a runtime container for all NavData that represents the world from the point of view of...
Definition: database.h:64
This class defines a two-dimensional vector whose coordinates are stored using 32-bit integers...
Definition: vec2i.h:26
Definition: gamekitcrowddispersion.h:20
void OnRemove()
Clears all information maintained by this object.
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
#define KyUInt16MAXVAL
The maximum value that can be stored in the KyUInt16 variable type.
Definition: types.h:230
bool IsActive() const
This function returns true if the NavFloor has been "activated" in term of overlap, dynamic version,...
Definition: navfloor.h:144
bool IsStillLoaded() const
This function returns false if the NavData containing corresponding NavFloorBlob has been removed fro...
Definition: navfloor.h:143
unsigned short KyUInt16
Type used internally to represent an unsigned 16-bit integer.
Definition: types.h:40
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
Internal class used for point spatialization in NavData.
Definition: spatializedpoint.h:171
const CellPos & GetCellPos() const
Returns the position of this NavFloor within the grid of NavData cells.
Definition: navfloor.h:146
Each instance of this class uniquely identifies a singleNavHalfEdge in a NavFloor.
Definition: navhalfedgerawptr.h:34