19 class CylinderObstacle;
84 m_altitudeMin = altitudeMin;
85 m_altitudeMax = altitudeMax;
127 WorldStatus_NotInit = 0,
129 WorldStatus_NotAdded,
133 enum IntegrationStatus
135 IntegrationStatus_NotIntegrated = 0,
136 IntegrationStatus_ToBeIntegrated,
137 IntegrationStatus_IntegrationInProcess,
138 IntegrationStatus_Integrated,
139 IntegrationStatus_ToBeDeintegrated,
140 IntegrationStatus_DeintegrationInProcess
145 ObstacleType_Undefined = 0,
146 ObstacleType_BoxObstacle,
147 ObstacleType_CylinderObstacle,
155 virtual const char* GetTypeName()
const {
return "TagVolume"; }
157 static const char* GetWorldStatusDescription(WorldStatus status);
158 static const char* GetIntegrationStatusDescription(IntegrationStatus status);
159 static const char* GetObstacleTypeName(ObstacleType obstacleType);
191 const Box3f& GetAABB()
const {
return m_aabb; }
192 KyFloat32 GetAltitudeMin()
const {
return m_aabb.m_min.z; }
193 KyFloat32 GetAltitudeMax()
const {
return m_aabb.m_max.z; }
194 KyUInt32 GetPointCount()
const {
return m_points.GetCount(); }
195 const Vec2f* GetPoints()
const {
return m_points.GetDataPtr(); }
196 const Vec2f& GetPoint(
KyUInt32 i)
const {
return m_points[i]; }
197 const DynamicNavTag& GetNavTag()
const {
return m_navTag; }
198 WorldStatus GetWorldStatus()
const {
return m_currentWorldStatus; }
199 IntegrationStatus GetIntegrationStatus()
const {
return m_integrationStatus; }
200 ObstacleType GetObstacleType()
const {
return m_obstacleType; }
201 void* GetObstacleRawPtr()
const {
return m_obstacleRawPtr; }
203 const DatabaseBinding* GetDatabaseBinding()
const {
return GetTagVolumeDatabaseData().m_databaseBinding; }
204 BoxObstacle* GetBoxObstacle()
const {
return ((m_obstacleType == ObstacleType_BoxObstacle) ? (
BoxObstacle*)m_obstacleRawPtr :
nullptr); }
205 CylinderObstacle* GetCylinderObstacle()
const {
return ((m_obstacleType == ObstacleType_CylinderObstacle) ? (
CylinderObstacle*)m_obstacleRawPtr :
nullptr); }
206 Bot* GetBot()
const {
return ((m_obstacleType == ObstacleType_Bot) ? (
Bot*)m_obstacleRawPtr :
nullptr); }
210 virtual void DoSendVisualDebug(VisualDebugServer& server, VisualDebugSendChangeEvent changeEvent);
213 void SetObstacle(
Bot* bot);
214 void ResetObstacle();
216 void OnIntegrationStart();
217 void OnDeIntegrationStart();
219 void OnIntegrationDone();
220 void OnDeIntegrationDone();
222 void OnIntegrationCancelled();
223 void OnDeIntegrationCancelled();
240 DynamicNavTag m_navTag;
245 ObstacleType m_obstacleType;
246 void* m_obstacleRawPtr;
247 TagVolumeCylinderExpander m_cylinderExpander;
248 TagVolumeBoxExpander m_boxExpander;
251 WorldStatus m_currentWorldStatus;
252 WorldStatus m_nextWorldStatus;
253 IntegrationStatus m_integrationStatus;
256 bool m_needToSendNewContextBlob;
257 bool m_needToSendTagVolumeBlob;
TagVolumeInitConfig provides TagVolume initialization parameters.
Definition: tagvolume.h:34
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
void InitFromTagVolumeBlob(const TagVolumeBlob &blob)
neither the World nor the DatabaseBinding are set
Definition: tagvolume.cpp:39
Indicates the altitude tolerance of the database will be removed from Zmin.
Definition: tagvolume.h:28
void Init6PointsContour(const Vec2f ¢er, const Vec2f &edge1, const Vec2f &edge2, const Vec2f &edge3)
Writes 6(+1) pos in m_points with points[last] == points[0].
Definition: tagvolume.cpp:53
DynamicNavTag m_navTag
This DynamicNavTag will be translated as NavTag in the DynamicNavMesh floors generated in the TagVolu...
Definition: tagvolume.h:99
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
void AddToWorld()
Adds the TagVolume to the World.
Definition: tagvolume.cpp:199
KyResult Init(const TagVolumeInitConfig &initConfig)
Initialize the TagVolume accordingly to the informations passed through the TagVolumeInitConfig.
Definition: tagvolume.cpp:144
void SetDefaults()
Sets all members to their default value.
Definition: tagvolume.h:42
Indicates the altitude tolerance of the database will be added to Zmax.
Definition: tagvolume.h:26
KyArray< Vec2f > m_points
m_points respect points[last] = points[last] m_points can be CW or CCW, TagVolume::Init() will make t...
Definition: tagvolume.h:103
General purpose array for movable objects that require explicit construction/destruction.
Definition: kyarray.h:162
TagVolumeExtendOptions
TagVolumeExtendOptions.
Definition: tagvolume.h:24
void InitFromBox(const Transform &transform, const Vec3f &localCenter, const Vec3f &localHalfExtents, DatabaseBinding *databaseBinding)
If the oriented box 2d projection is a 4 points shape, writes 4(+1) points.
Definition: tagvolume.cpp:82
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:196
This class is a runtime container for Autodesk Navigation WorldElements such as NavData, Bots, BoxObstacles, TagVolumes...
Definition: world.h:52
Ptr< DatabaseBinding > m_databaseBinding
Defines the Databases in which the TagVolume will be spatialized.
Definition: tagvolume.h:96
Indicates the altitude tolerance of the database will be removed from Zmin.
Definition: tagvolume.h:27
void Init4PointsContour(const Vec2f ¢er, const Vec2f &edge1, const Vec2f &edge2)
Writes 4(+1) pos in m_points with m_points[last] == m_points[0].
Definition: tagvolume.cpp:48
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
void SetWorld(World *world)
WARNING Very internal. Used only internally during the generation process.
Definition: tagvolume.h:230
This class represents runtime-defined volumes with customized NavTag.
Definition: tagvolume.h:119
3d axis aligned box of 32bits floating points
Definition: box3f.h:16
2d vector using KyFloat32.
Definition: vec2f.h:18
Navigation return code class.
Definition: types.h:108
DatabaseBinding is a collection of the databases to be used for world elements spatialization.
Definition: databasebinding.h:21
WorldElementType
Enumerates the WorldElement types.
Definition: worldelementtype.h:13
Base internal class used to represent elements that can be added to a World, such as instances of Dat...
Definition: worldelement.h:41
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
void SetContour(const Vec2f *points, KyUInt32 pointCount)
Writes points in m_points plus potentially one additional point to make sure m_points[last] == m_poin...
Definition: tagvolume.cpp:21
World * m_world
Mandatory: you must provide a World when calling TagVolume::Init().
Definition: tagvolume.h:92
Each TagVolume instance aggregates one instance of this class to maintain its spatialization informat...
Definition: tagvolumespatialization.h:42
Each instance of the BoxObstacle class represents a dynamic, physical object in your game engine that...
Definition: boxobstacle.h:127
void RemoveFromWorld()
Removes the TagVolume from the World.
Definition: tagvolume.cpp:283
float KyFloat32
float
Definition: types.h:32
3d vector using 32bits floating points.
Definition: vec3f.h:16