63 const Vec3f& GetVelocity()
const;
64 const Vec3f& GetPosition()
const;
75 void SetVelocity(
const Vec3f& velocity);
76 void SetPosition(
const Vec3f& position);
80 void InvalidateAllDbSpatializations();
84 Ptr<SpatializedPoint> m_spatializedPoint;
89 KY_INLINE SpatializedCylinder::SpatializedCylinder() : m_velocity(
Vec3f::Zero()) , m_radius(0.0f) {}
90 KY_INLINE SpatializedCylinder::~SpatializedCylinder() { Clear(); }
92 KY_INLINE
void SpatializedCylinder::Clear()
94 if (m_spatializedPoint !=
nullptr)
95 m_spatializedPoint->Clear();
97 m_spatializedPoint =
nullptr;
101 KY_INLINE
KyFloat32 SpatializedCylinder::GetRadius()
const {
return m_radius; }
102 KY_INLINE
const Vec3f& SpatializedCylinder::GetVelocity()
const {
return m_velocity; }
103 KY_INLINE
const Vec3f& SpatializedCylinder::GetPosition()
const {
return m_spatializedPoint->GetPosition(); }
104 KY_INLINE
const SpatializedPoint& SpatializedCylinder::GetSpatializedPoint()
const {
return *m_spatializedPoint; }
105 inline NavTrianglePtr SpatializedCylinder::GetNavTrianglePtr(Database* database)
const {
return m_spatializedPoint->GetNavTrianglePtr(database); }
108 KY_INLINE
SpatializedPoint& SpatializedCylinder::GetSpatializedPoint() {
return *m_spatializedPoint; }
110 KY_INLINE
void SpatializedCylinder::SetRadius(
KyFloat32 radius) { m_radius = radius; }
111 KY_INLINE
void SpatializedCylinder::SetVelocity(
const Vec3f& velocity) { m_velocity = velocity; }
112 KY_INLINE
void SpatializedCylinder::SetPosition(
const Vec3f& position) { m_spatializedPoint->SetPosition(position); }
113 KY_INLINE
void SpatializedCylinder::SetHeight(
KyFloat32 height) { m_spatializedPoint->SetHeight(height); }
114 KY_INLINE
void SpatializedCylinder::InvalidateAllDbSpatializations() { m_spatializedPoint->InvalidateAllDbSpatializations(); }
117 KY_INLINE SpatializedCylinderInitConfig::SpatializedCylinderInitConfig() {
SetDefaults(); }
125 KY_INLINE
void SpatializedCylinderInitConfig::InitFromBot(Ptr<DatabaseBinding> databaseBinding,
Bot* bot,
KyFloat32 radius,
KyFloat32 height)
127 m_spatializedPointInitConfig.InitFromBot(databaseBinding, bot, height);
131 KY_INLINE
void SpatializedCylinderInitConfig::InitFromCylinderObstacle(Ptr<DatabaseBinding> databaseBinding, CylinderObstacle* cylinderObstacle,
KyFloat32 radius,
KyFloat32 height)
133 m_spatializedPointInitConfig.InitFromCylinderObstacle(databaseBinding, cylinderObstacle, height);
137 KY_INLINE
void SpatializedCylinderInitConfig::InitFromBoxObstacle(Ptr<DatabaseBinding> databaseBinding, BoxObstacle* boxObstacle,
KyUInt32 cylinderIndex,
KyFloat32 radius,
KyFloat32 height)
139 m_spatializedPointInitConfig.InitFromBoxObstacle(databaseBinding, boxObstacle, cylinderIndex, height);
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
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
void SetDefaults()
Sets all members to their default value.
Definition: spatializedcylinder.h:119
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
Class used to initialize a SpatializedCylinder.
Definition: spatializedcylinder.h:19
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
KyFloat32 GetHeight() const
Note: height is only used for visual debugging, it is not relevant for navigation.
Definition: spatializedcylinder.h:106
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
Internal representation of world elements, using a vertical cylinder shape.
Definition: spatializedcylinder.h:44
Each instance of this class uniquely identifies a single NavTriangle in a NavFloor.
Definition: navtriangleptr.h:17
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
float KyFloat32
float
Definition: types.h:32
3d vector using 32bits floating points.
Definition: vec3f.h:16