19 class DatabaseBinding;
21 class PositionSpatializationRange;
22 class WorldIntegerPos;
26 class CylinderObstacle;
28 class PointOfInterest;
34 SpatializedPointObjectType_Undefined = 0,
35 SpatializedPointObjectType_Bot,
36 SpatializedPointObjectType_CylinderObstacle,
37 SpatializedPointObjectType_BoxObstacle,
38 SpatializedPointObjectType_PointOfInterest,
40 SpatializedPointObjectType_Count
43 enum SpatializationUpdateCoherency
45 SpatializationUpdateCoherency_Maximum,
46 SpatializationUpdateCoherency_Minimum,
50 class PointDbSpatialization
57 void UpdateFromPrevious(
58 Database* database,
const PositionSpatializationRange& range,
59 const Vec3f& prevPosition,
const PointDbSpatialization& prevDbSpatialization,
const Vec3f& newPosition);
61 void UpdateFromScratch(
62 Database* database,
const PositionSpatializationRange& range,
63 const Vec3f& newPosition,
const WorldIntegerPos* newPositionInteger =
nullptr);
66 static PositionSpatializationRange ComputeRange(
67 const Database* database, SpatializationUpdateCoherency updateMode,
KyFloat32 height = 0.f);
70 NavTriangleRawPtr m_navTriangle;
78 class PointSpatialization
84 PointSpatialization() : m_pointDbSpatialization(
nullptr) {}
86 void Init(DatabaseBinding* databaseBinding);
89 void InvalidateAllDbSpatializations();
90 bool OneBoundDatabaseNavMeshHasChanged();
92 NavTrianglePtr GetNavTrianglePtr(Database* database)
const;
96 void UpdateSpatializationButNotFloors(
const Vec3f& prevPosition,
const PointSpatialization& prevPointSpatialization,
const Vec3f& newPosition, SpatializationUpdateCoherency updateMode,
KyFloat32 height);
99 void CreateDbSpatializationPoints();
100 void DestroyDbSpatializationPoints();
101 bool BoundDatabaseNavMeshHasChanged(
KyUInt32 boundDatabaseIndex);
104 Ptr<DatabaseBinding> m_databaseBinding;
105 PointDbSpatialization* m_pointDbSpatialization;
125 void InitFromBot( Ptr<DatabaseBinding> databaseBinding,
Bot* bot ,
KyFloat32 height);
126 void InitFromCylinderObstacle(Ptr<DatabaseBinding> databaseBinding,
CylinderObstacle* cylinderObstacle,
KyFloat32 height);
128 void InitFromPointOfInterest( Ptr<DatabaseBinding> databaseBinding,
PointOfInterest* pointOfInterest ,
KyFloat32 height);
160 void InvalidateAllDbSpatializations();
164 const DatabaseBinding* GetDatabaseBinding()
const {
return m_pointSpatialization.m_databaseBinding; }
165 KyUInt32 GetDbSpatializationCount()
const {
return m_pointSpatialization.m_databaseBinding->GetBoundDatabaseCount(); }
167 const PointDbSpatialization& GetDbSpatialization(
KyUInt32 boundDatabaseIdx)
const {
return m_pointSpatialization.m_pointDbSpatialization[boundDatabaseIdx]; }
169 const Vec3f& GetPosition()
const {
return m_position; }
170 KyFloat32 GetHeight()
const {
return m_height; }
171 void* GetObject()
const {
return m_object; }
173 KyUInt32 GetIndexInObject()
const {
return m_indexInObject; }
177 bool GetHasChanged()
const {
return m_hasChanged; }
179 const PointSpatialization& GetPointSpatialization()
const {
return m_pointSpatialization; }
183 void SetPosition(
const Vec3f& position) { m_position = position; }
186 void SetHeight(
KyFloat32 height) { m_height = height; }
190 void UpdateSpatialization(
const Vec3f& newPosition);
194 void UpdateSpatialization(
const Vec3f& newPosition,
const PointSpatialization& newPointSpatialization);
198 void OnNavFloorDeActivation(
NavFloor* navFloor);
200 void SetHasChanged(
bool hasChanged) { m_hasChanged = hasChanged; }
202 DatabaseBinding* GetDatabaseBinding() {
return m_pointSpatialization.m_databaseBinding; }
207 PointDbSpatialization& GetDbSpatialization(
KyUInt32 boundDatabaseIdx) {
return m_pointSpatialization.m_pointDbSpatialization[boundDatabaseIdx]; }
208 void Invalidate(
KyUInt32 boundDatabaseIdx);
212 PointSpatialization m_pointSpatialization;
CylinderObstacles represent dynamic objects of your game engine that prevent your Bots from moving fr...
Definition: cylinderobstacle.h:76
This class is the world element that represent an active character in Autodesk Navigation.
Definition: bot.h:128
This class is a runtime wrapper of a NavFloorBlob, it gathers all the runtime information associated ...
Definition: navfloor.h:32
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
void SetDefaults()
Sets all members to their default value.
Definition: spatializedpoint.cpp:415
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:196
Ptr< DatabaseBinding > m_databaseBinding
Defines the Databases in which the SpatializedPoint will be spatialized.
Definition: spatializedpoint.h:134
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
Class used to initialize a SpatializedPoint.
Definition: spatializedpoint.h:111
This class is a runtime container for all NavData that represents the world from the point of view of...
Definition: database.h:57
DatabaseBinding is a collection of the databases to be used for world elements spatialization.
Definition: databasebinding.h:21
SpatializedPointObjectType
Enumerates the possible object types the SpatializedPoint refers to.
Definition: spatializedpoint.h:32
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
Each instance of this class uniquely identifies a single NavTriangle in a NavFloor.
Definition: navtriangleptr.h:17
PointOfInterest is a tagged position spatialized into the NavMesh.
Definition: pointofinterest.h:71
SpatializedPoint is used to the NavTriangle of "object": Bot, CylinderObstacle, BoxObstacle and Point...
Definition: spatializedpoint.h:146
Each instance of the BoxObstacle class represents a dynamic, physical object in your game engine that...
Definition: boxobstacle.h:127
#define KyUInt32MAXVAL
KyUInt32 max value
Definition: types.h:68
float KyFloat32
float
Definition: types.h:32
3d vector using 32bits floating points.
Definition: vec3f.h:16