8 #ifndef Navigation_SpatializedCylinder_H
9 #define Navigation_SpatializedCylinder_H
21 class SpatializedCylinderInitConfig
55 ~SpatializedCylinder();
65 const
Vec3f& GetVelocity() const;
66 const
Vec3f& GetPosition() const;
77 void SetVelocity(const
Vec3f& velocity);
78 void SetPosition(const
Vec3f& position);
82 bool UpdateSpatialization(const
Vec3f& currentPosition, SpatializationUpdateCoherency updateMode = SpatializationUpdateCoherency_Maximum, PointSpatialization* inputOutputIntermediateSpatialization =
KY_NULL);
83 void InvalidateAllDbSpatializations();
92 KY_INLINE SpatializedCylinder::SpatializedCylinder() : m_velocity(
Vec3f::Zero()) , m_radius(0.0f) {}
93 KY_INLINE SpatializedCylinder::~SpatializedCylinder() { Clear(); }
95 KY_INLINE
void SpatializedCylinder::Clear()
97 if (m_spatializedPoint !=
KY_NULL)
98 m_spatializedPoint->Clear();
104 KY_INLINE
KyFloat32 SpatializedCylinder::GetRadius()
const {
return m_radius; }
105 KY_INLINE
const Vec3f& SpatializedCylinder::GetVelocity()
const {
return m_velocity; }
106 KY_INLINE
const Vec3f& SpatializedCylinder::GetPosition()
const {
return m_spatializedPoint->GetPosition(); }
107 KY_INLINE
const SpatializedPoint& SpatializedCylinder::GetSpatializedPoint()
const {
return *m_spatializedPoint; }
108 inline NavTrianglePtr SpatializedCylinder::GetNavTrianglePtr(Database* database)
const {
return m_spatializedPoint->GetNavTrianglePtr(database); }
111 KY_INLINE SpatializedPoint& SpatializedCylinder::GetSpatializedPoint() {
return *m_spatializedPoint; }
113 KY_INLINE
void SpatializedCylinder::SetRadius(
KyFloat32 radius) { m_radius = radius; }
114 KY_INLINE
void SpatializedCylinder::SetVelocity(
const Vec3f& velocity) { m_velocity = velocity; }
115 KY_INLINE
void SpatializedCylinder::SetPosition(
const Vec3f& position) { m_spatializedPoint->SetPosition(position); }
116 KY_INLINE
void SpatializedCylinder::SetHeight(
KyFloat32 height) { m_spatializedPoint->SetHeight(height); }
117 KY_INLINE
void SpatializedCylinder::InvalidateAllDbSpatializations() { m_spatializedPoint->InvalidateAllDbSpatializations(); }
119 KY_INLINE
bool SpatializedCylinder::UpdateSpatialization(
const Vec3f& currentPosition, SpatializationUpdateCoherency updateMode, PointSpatialization* inputOutputIntermediateSpatialization)
121 return m_spatializedPoint->UpdateSpatialization(currentPosition, updateMode, inputOutputIntermediateSpatialization);
125 KY_INLINE SpatializedCylinderInitConfig::SpatializedCylinderInitConfig() { SetDefaults(); }
128 m_spatializedPointInitConfig.SetDefaults();
132 KY_INLINE
void SpatializedCylinderInitConfig::InitFromBot(Ptr<DatabaseBinding> databaseBinding, Bot* bot,
KyFloat32 radius,
KyFloat32 height)
134 m_spatializedPointInitConfig.InitFromBot(databaseBinding, bot, height);
138 KY_INLINE
void SpatializedCylinderInitConfig::InitFromCylinderObstacle(Ptr<DatabaseBinding> databaseBinding,
CylinderObstacle* cylinderObstacle,
KyFloat32 radius,
KyFloat32 height)
140 m_spatializedPointInitConfig.InitFromCylinderObstacle(databaseBinding, cylinderObstacle, height);
144 KY_INLINE
void SpatializedCylinderInitConfig::InitFromBoxObstacle(Ptr<DatabaseBinding> databaseBinding,
BoxObstacle* boxObstacle,
KyUInt32 cylinderIndex,
KyFloat32 radius,
KyFloat32 height)
146 m_spatializedPointInitConfig.InitFromBoxObstacle(databaseBinding, boxObstacle, cylinderIndex, height);
152 #endif // Navigation_SpatializedCylinder_H
CylinderObstacles represent dynamic objects of your game engine that prevent your Bots from moving fr...
Definition: cylinderobstacle.h:87
This class is the world element that represent an active character in Gameware Navigation.
Definition: bot.h:150
#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
void SetDefaults()
Sets all members to their default value.
Definition: spatializedcylinder.h:154
Class used to initialize a SpatializedCylinder.
Definition: spatializedcylinder.h:22
Class used to initialize a SpatializedPoint.
Definition: spatializedpoint.h:120
This class is a runtime container for all NavData that represents the world from the point of view of...
Definition: database.h:64
KyFloat32 GetHeight() const
Note: height is only used for visual debugging, it is not relevant for navigation.
Definition: spatializedcylinder.h:137
Definition: gamekitcrowddispersion.h:20
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
Internal representation of world elements, using a vertical cylinder shape.
Definition: spatializedcylinder.h:56
Each instance of this class uniquely identifies a single NavTriangle in a NavFloor.
Definition: navtriangleptr.h:22
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
Each instance of the BoxObstacle class represents a dynamic, physical object in your game engine that...
Definition: boxobstacle.h:139
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43
This class defines a three-dimensional vector whose coordinates are stored using floating-point numbe...
Definition: vec3f.h:23