Kaim::World Class Reference
#include <world.h>
This class is a runtime container for Gameware Navigation WorldElements such as NavData, Bots, BoxObstacles, TagVolumes...
- performance/Tutorial_MultiThreading.cpp, performance/Tutorial_MultiThreading_5_worlds.cpp, performance/Tutorial_NoTimeSlicing.cpp, performance/Tutorial_TimeSlicing.cpp, Tutorial_AvoidanceFilter.cpp, Tutorial_FirstIntegration.cpp, Tutorial_Generation_Navdata_FromMem.cpp, Tutorial_Generation_postProcess.cpp, Tutorial_NavMeshTraversal.cpp, Tutorial_NavTag.cpp, Tutorial_ObstacleIntegration.cpp, Tutorial_Obstacles.cpp, Tutorial_PointOfInterest.cpp, Tutorial_QueryQueue.cpp, Tutorial_SplineFollow.cpp, Tutorial_VisualDebug.cpp, Tutorial_VisualGeometry.cpp, and Tutorial_WorldInit.cpp.
Inherits Kaim::RefCountBaseNTS< C, Stat >.
|
| World (KyUInt32 databaseCount=1) |
|
virtual | ~World () |
|
void | SetUserData (void *userData) |
|
void * | GetUserData () |
|
|
void | RemoveAndCancellAll () |
|
void | RemoveAllBots () |
|
void | RemoveAllPointsOfInterest () |
|
void | RemoveAllCylinderObstacles () |
|
void | RemoveAllBoxObstacles () |
|
void | RemoveAllTagVolumes () |
|
void | ClearDatabase (KyUInt32 databaseIndex) |
|
Kaim::World::World |
( |
KyUInt32 |
databaseCount = 1 | ) |
|
|
explicit |
- Parameters
-
databaseCount | The number of databases added to this world, must be greater than or equal to 1. |
If TraverseLogic of the NavigationProfile has obsolete functions, navigationProfile won't be added and AddNavigationProfile returns KyUInt32MAXVAL.
VisualDebugAttributesManager * Kaim::World::GetAttributesManager |
( |
| ) |
|
|
inline |
Get the attributesManager that is required when creating an attribute group.
- Precondition
- index must be valid, we don't check it there.
- Precondition
- index must be valid, we don't check it there.
- Precondition
- index must be valid, we don't check it there.
VisualDebugRegistry * Kaim::World::GetElementRegistry |
( |
| ) |
|
|
inline |
Returns the registry in this World of instances of WorldElement that can be visually debugged in Gameware Navigation Lab.
KyUInt32 Kaim::World::GetNumberOfFramesForShortcutTrajectoryPeriodicUpdate |
( |
| ) |
const |
|
inline |
Gives the number of frames between two updates of the PathFollowing for each bot.
- Precondition
- index must be valid, we don't check it there.
- Precondition
- index must be valid, we don't check it there.
- Precondition
- index must be valid, we don't check it there.
- Precondition
- index must be valid, we don't check it there.
- Precondition
- index must be valid, we don't check it there.
KyUInt32 Kaim::World::GetUpdateCount |
( |
| ) |
const |
|
inline |
Retrieves the number of times Update() has been called.
WorldStatistics * Kaim::World::GetWorldStatistics |
( |
| ) |
|
|
inline |
Returns statistics on CPU consumption during Update() and its steps.
With KY_BUILD_SHIPPING, it returns KY_NULL;
void Kaim::World::RemoveAndCancellAll |
( |
| ) |
|
Remove all Bots, PointOfInterest, CylinderObstacles, BoxObstacles, TagVolumes, and NavData; and cancel all queries.
void Kaim::World::SetNumberOfFramesForShortcutTrajectoryPeriodicUpdate |
( |
KyUInt32 |
numberOfFrames | ) |
|
|
inline |
Set the number of frames between two updates of the PathFollowing for all bots with TrajectoryMode_Shortcut.
Default value is 1 in order to get an update each frame.
If 0 is passed, it is defaulted to 1.
For instance, by setting a value of 5, UpdateBotPathFollowing will call the ProgressOnPathComputer and the Trajectory one frame on 5, this will make UpdateBotPathFollowing being around 3 times faster since the number of RayCanGo used to maintained the TargetOnPathStatus is exactly divided by 5, but some other components are already skipping some frames, hence their cost is not divided by 5.
Starts the visual debug server. You can start it at any time.
void Kaim::World::Update |
( |
KyFloat32 |
simulationTimeInSeconds = 0.016f | ) |
|
Updates the World.
It is possible to use Gameware Navigation as a NavMesh/NavGraph Query toolbox without calling World::Update(). But to easily support Bots, obstacles, DynamicNavMesh, etc., a World::Update() call is required every frame.
The documentation for this class was generated from the following file: