Kaim::BoxObstacle Class Reference
#include <boxobstacle.h>
Each instance of the BoxObstacle class represents a dynamic, physical object in your game engine that will prevent your Bots from moving freely through its bounding box.
Typical examples are crates, furniture, movable or destructible walls, rubble, vehicles, doors, etc.
By default BoxObstacles are integrated in avoidance trajectory computation through their bounding cylinders. If your game obstacle does not move, you can set DoesTriggerTagVolume to true to make Autodesk Navigation spawn and manage a TagVolume around the BoxObstacle that will be integrated into the DynamicNavMesh.
Inherits Kaim::WorldElement.
|
virtual void | DoSendVisualDebug (VisualDebugServer &visualDebugServer, VisualDebugSendChangeEvent changeEvent) |
|
void | UpdateSpatialization () |
|
void | SetupTagVolumeInitConfig (TagVolumeInitConfig &tagVolumeInitConfig) |
|
void | OnTagVolumeIntegration () |
|
const SpatializedCylinder & | GetCentralSpatializedCylinder () const |
|
KyUInt32 | GetSampledSpatializedCylinderCount () const |
|
const SpatializedCylinder & | GetSampledSpatializedCylinder (KyUInt32 index) const |
|
|
bool | IsAddedToWorld () const |
|
World * | GetWorld () const |
|
KyUInt32 | GetVisualDebugId () const |
|
void * | GetUserData () const |
|
void | SetUserData (void *userData) |
|
|
void | SendForMaxLevelOfDetail (VisualDebugServer &server, const Vec3f &shapePosition) |
|
void | RegisterToVisualDebug () |
|
void | UnRegisterFromVisualDebug () |
|
KyUInt32 | GetIndexInCollection () const |
|
void | SetIndexInCollection (KyUInt32 indexInCollection) |
|
void Kaim::BoxObstacle::AddToWorld |
( |
| ) |
|
Adds the BoxObstacle to the World.
Once added, it becomes active in the simulation, is updated, taken into account by Bots, etc. This increments the RefCount of this instance. NOTE: this method has immediate effect: ensure to call this outside of any Autodesk Navigation computation (World::Update() or threaded query computation). However, the spatialization is not updated immediately, this will be done in next World::Update().
void Kaim::BoxObstacle::Clear |
( |
| ) |
|
Prepares this instance for destruction and / or reuse: sets all members to their default values and clears all SpatializedCylinders.
bool Kaim::BoxObstacle::DoesTriggerTagVolume |
( |
| ) |
const |
Returns whether the TriggerTagVolume flag is raised or not; not if the BoxObstacle has actually triggered a TagVolume.
To get current TagVolume status, use GetTagVolumeIntegrationStatus() method.
void Kaim::WorldElement::ForceSendAllVisualDebug |
( |
| ) |
|
|
inlineinherited |
Call this when something impacts all your visual debug data.
It will set the event to VisualDebugSendChangeEvent_ForceSendAll. (called internally when connecting with a VisualDebug client).
Returns a short description of the rotation mode for visual debug.
Sets m_world and allocates memory depending on m_databaseBinding; it does not add the obstacle to the world, and does not modify the world.
If m_world is already set, the obstacle is first removed from m_world. Asserts if initConfig.m_world == NULL, or if half extents are invalid.
void Kaim::BoxObstacle::RemoveFromWorld |
( |
| ) |
|
Removes the BoxObstacle from the World.
It is removed from the simulation, updates are stopped, and it is ignored by Bots. This decrements the RefCount of this instance. NOTE: this method has immediate effect: ensure to call this outside of any Autodesk Navigation computation (Kaim::World::Update or threaded query computation). The spatialization information are immediately invalidated too.
void Kaim::BoxObstacle::SetAngularVelocity |
( |
const Vec3f & |
angularVelocity | ) |
|
|
inline |
The rotational speed as rotation vector.
This should provides at once rotation axis and angular speed (in radians per second).
void Kaim::WorldElement::SetCurrentVisualDebugLOD |
( |
VisualDebugLOD |
lod | ) |
|
|
inlineinherited |
Set the visual debug level of details to use for this WorldElement instance.
Generally, setting this to VisualDebugLOD_Minimal, sends almost nothing but position and status, whereas setting it to VisualDebugLOD_Maximal sends all available debug information including spatialization and some internal algorithm results.
void Kaim::BoxObstacle::SetDoesTriggerTagVolume |
( |
bool |
doesTriggerTagVolume | ) |
|
|
inline |
This information is copied and applied in the next World::Update.
Setting to true will trigger a TagVolume for this BoxObstacle during the next World::Update. The TagVolume will then be integrated into the DynamicNavMesh, and the obstacle will be no longer be visible as sampled cylinders nor integrated into avoidance computation. While set to true, the position is not updated. If the obstacle triggering a TagVolume is moved, set to false, wait at least one frame to ensure the BoxObstacle is updated, then set it back to true once your obstacle is stationary again.
void Kaim::BoxObstacle::SetLinearVelocity |
( |
const Vec3f & |
linearVelocity | ) |
|
|
inline |
The linear velocity at the local transform center of the box.
Sets the next rotation mode used to update this BoxObstacle.
For BoxObstacleUpdateConfig, the BoxObstacleRotationMode is copied and applied in the next World::Update.
void Kaim::BoxObstacle::SetTransform |
( |
const Transform & |
transform | ) |
|
|
inline |
The transform of the box.
Vec3f Kaim::BoxObstacle::m_angularVelocity |
|
private |
Stores the rotational speed as rotation vector expressed in World coordinate system.
This should provides at once rotation axis and angular speed (in radians per second).
Vec3f Kaim::BoxObstacle::m_linearVelocity |
|
private |
The linear velocity, expressed in World coordinate system, at the local transform center of the box.
The documentation for this class was generated from the following files:
- gwnavruntime/world/boxobstacle.h
- gwnavruntime/world/boxobstacle.cpp