18 class DatabaseBinding;
38 m_startPosition.
Set(0.0f, 0.0f, 0.0f);
59 Vec3f m_startPosition;
85 virtual const char* GetTypeName()
const {
return "CylinderObstacle"; }
123 void SetPosition(
const Vec3f& position);
140 const DynamicNavTag& GetNavTag()
const;
146 const Vec3f& GetPosition()
const;
147 const Vec3f& GetVelocity()
const;
149 bool DoesTriggerTagVolume()
const;
151 TagVolume::IntegrationStatus GetTagVolumeIntegrationStatus()
const;
156 virtual void DoSendVisualDebug(VisualDebugServer& server, VisualDebugSendChangeEvent changeEvent);
161 void UpdateSpatialization();
169 void OnTagVolumeIntegration();
177 bool m_doesTriggerTagVolume;
179 DynamicNavTag m_navTag;
180 Ptr<DatabaseBinding> m_databaseBinding;
189 KY_INLINE
const DynamicNavTag& CylinderObstacle::GetNavTag()
const {
return m_navTag; }
191 KY_INLINE SpatializedCylinder& CylinderObstacle::GetSpatializedCylinder() {
return m_spatializedCylinder; }
192 KY_INLINE
const SpatializedCylinder& CylinderObstacle::GetSpatializedCylinder()
const {
return m_spatializedCylinder; }
193 KY_INLINE
KyFloat32 CylinderObstacle::GetRadius()
const {
return m_spatializedCylinder.GetRadius(); }
196 KY_INLINE
const Vec3f& CylinderObstacle::GetPosition()
const {
return m_position; }
197 KY_INLINE
const Vec3f& CylinderObstacle::GetVelocity()
const {
return m_velocity; }
199 KY_INLINE
void CylinderObstacle::SetPosition(
const Vec3f& position) { m_position = position; }
202 KY_INLINE
bool CylinderObstacle::DoesTriggerTagVolume()
const {
return m_doesTriggerTagVolume; }
203 KY_INLINE
const TagVolume* CylinderObstacle::GetTagVolume()
const {
return m_tagVolumeTrigger.GetTagVolume(); }
204 KY_INLINE TagVolume::IntegrationStatus CylinderObstacle::GetTagVolumeIntegrationStatus()
const {
return m_tagVolumeTrigger.GetIntegrationStatus(); }
206 KY_INLINE
const DatabaseBinding* CylinderObstacle::GetDatabaseBinding()
const {
return m_databaseBinding; }
210 KY_INLINE
void CylinderObstacle::OnTagVolumeIntegration()
212 m_spatializedCylinder.InvalidateAllDbSpatializations();
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
void ForceSendAllVisualDebug()
Call this when something impacts all your visual debug data.
Definition: worldelement.h:123
World * m_world
Mandatory: you must provide a World when calling CylinderObstacle::Init.
Definition: cylinderobstacle.h:48
void Set(KyFloat32 _x, KyFloat32 _y, KyFloat32 _z)
Sets {_x, _y, _z}.
Definition: vec3f.h:29
DynamicNavTag m_navTag
This DynamicNavTag will be used to set up the TagVolume NavTag when the CylinderObstacle will trigger...
Definition: cylinderobstacle.h:57
void RemoveFromWorld()
Removes the CylinderObstacle from the World: it is removed from the simulation, it is no longer updat...
Definition: cylinderobstacle.cpp:99
#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
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
This class represents runtime-defined volumes with customized NavTag.
Definition: tagvolume.h:119
KyFloat32 GetHeight() const
Used only for visual debugging. Not relevant for navigation.
Definition: cylinderobstacle.h:194
void SetVelocity(const Vec3f &velocity)
The CylinderObstacle velocity expressed in meter per seconds.
Definition: cylinderobstacle.h:200
TagVolumeTrigger is dedicated to TagVolume creation / removal management.
Definition: tagvolumetrigger.h:22
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
Ptr< DatabaseBinding > m_databaseBinding
Defines the Databases in which the CylinderObstacle will be spatialized.
Definition: cylinderobstacle.h:53
KyFloat32 GetHeight() const
Note: height is only used for visual debugging, it is not relevant for navigation.
Definition: spatializedcylinder.h:106
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 AddToWorld()
Adds the CylinderObstacle to the World: it becomes active in the simulation, it is updated...
Definition: cylinderobstacle.cpp:86
void SetDefaults()
Sets all members to their default value.
Definition: cylinderobstacle.h:32
void SetDoesTriggerTagVolume(bool triggerTagVolume)
This information is copied and applied in the next World::Update.
Definition: cylinderobstacle.h:208
Internal representation of world elements, using a vertical cylinder shape.
Definition: spatializedcylinder.h:44
void Clear()
Prepares this instance for destruction or reuse; it sets all members to their default values...
Definition: cylinderobstacle.cpp:75
Vec3f m_velocity
The CylinderObstacle velocity expressed in meter per seconds.
Definition: cylinderobstacle.h:176
void Init(const CylinderObstacleInitConfig &initConfig)
Sets m_world and allocates memory depending on m_databaseBinding but does not add the CylinderObstacl...
Definition: cylinderobstacle.cpp:36
float KyFloat32
float
Definition: types.h:32
3d vector using 32bits floating points.
Definition: vec3f.h:16
Class used to provide CylinderObstacle initialization parameters.
Definition: cylinderobstacle.h:22