Kaim::Database Class Reference
#include <database.h>
This class is a runtime container for all NavData that represents the world from the point of view of a specific type of Bots.
Databases are created once and for all during the World construction. Through some sub-classes (NavMeshElementManager, NavGraphManager, NavCellGrid, ...), the Database performs the additions and removals of NavData, maintaining a coherent state of "active" navigable data on which Bots are moving, Queries are performed, in term of overlaps, dynamic version of NavFloors, stitching of the NavCells, etc... The Database also maintains an instance of WorkingMemory, which is used by default by the Queries that are not processed within a QueryQueue.
Inherits Kaim::WorldElement.
|
KyUInt32 | m_frameIdx |
|
DatabasePositionSpatializationRange | m_positionSpatializationRange |
|
DatabaseGenMetrics | m_generationMetrics |
| generation parameters. Set by the NavMeshElementManager. Do Not Modify More...
|
|
ActiveData * | m_activeData |
| all the data that are active More...
|
|
NavCellGrid * | m_navCellGrid |
| bookkeeping, stitching, spatialization, NavCells version management, ... More...
|
|
NavMeshElementManager * | m_navMeshElementManager |
| NavMesh container + GUID manager/sorter. More...
|
|
NavGraphManager * | m_navGraphManager |
| NavGraph container. More...
|
|
AbstractGraphCellGrid * | m_abstractGraphCellGrid |
|
WorkingMemory * | m_workingMemory |
|
TrackedCollection< Ptr< Bot >, MemStat_WorldFwk > | m_bots |
|
TrackedCollection< Ptr< ITriangleCostMap >, MemStat_WorldFwk > | m_triangleCostMaps |
|
TrackedCollection< Ptr< NavData >, MemStat_WorldFwk > | m_navDataToBeAdded |
|
TrackedCollection< Ptr< NavData >, MemStat_WorldFwk > | m_navDataBeeingAdded |
|
TrackedCollection< Ptr< NavData >, MemStat_WorldFwk > | m_navDatas |
|
TrackedCollection< Ptr< NavData >, MemStat_WorldFwk > | m_navDataToBeRemoved |
|
TrackedCollection< Ptr< NavData >, MemStat_WorldFwk > | m_navDataBeeingRemoved |
|
Ptr< IDatabaseChangeBroadcaster > | m_eventBroadCaster |
|
DatabaseGeometryBuildingManager | m_geometryBuildingManager |
|
bool | m_needToSendActiveNavData |
| (VisualDebug) Avoids sending all the active NavData each frame. Accessed by the NavCellGrid. More...
|
|
Collection< Ptr< BaseBlobHandler > > | m_visualDebugBlobCollection |
| (VisualDebug) store the blob to be send during the DoSendVisualDebug call. More...
|
|
PerformQueryStatistics * | m_queryStatistics |
|
KyUInt32 | m_databaseIndex |
|
DatabaseChangeInProgress | m_changeInProgress |
|
DatabaseChangeIdx | m_activeChangeIdx |
|
DatabaseChange | m_lastChange |
|
Collection< Ptr< IDatabaseChangeListener > > | m_databaseChangeListeners |
|
| Database (World *world, KyUInt32 databaseIndex) |
|
virtual | ~Database () |
|
void | Clear () |
| internal, use World::ClearDatabase(KyUInt32 databaseIndex). RemoveAll navData, bots, clear memory of cell grid, activeData and GenerationMetrics More...
|
|
virtual void | DoSendVisualDebug (VisualDebugServer &visualDebugServer, VisualDebugSendChangeEvent changeEvent) |
|
PerformQueryStatistics * | GetPerformQueryStatistics () |
| Return statistics on queries called on this Database. More...
|
|
void | SetEventBroadcaster (IDatabaseChangeBroadcaster *eventBroadCaster) |
|
void | UpdateImmediate () |
|
|
ActiveData * | GetActiveData () const |
|
void | RecomputeAllTriangleCostMapInBox (const CellBox &cellBox) |
|
void | StartNavDataAddRemoveUpdate (QueryProcessMode processMode) |
|
bool | IsThereNavDataAddRemovePending () const |
|
bool | IsDoingNavDataAddRemoveUpdate () const |
|
void | FinalizeNavDataAddRemoveUpdate () |
|
void | FinalizeTagVolumeIntegrationUpdate (const CellBox &tagVolumeChangeCellBox) |
|
void | UpdateBotsPathFollowing (KyFloat32 simulationTimeInSeconds) |
|
void | UpdateBotsGenMetrics () |
|
KyUInt32 | GetRayCanGoMarginInt (RayCanGoMarginMode marginMode) |
|
KyFloat32 | GetRayCanGoMarginFloat (RayCanGoMarginMode marginMode) |
|
void | SetupGenerationMetrics (const NavMeshGenParameters &navMeshGenParameters) |
|
KyUInt32 | GetActiveNavMeshChangeIdx () const |
|
KyUInt32 | GetActiveNavGraphChangeIdx () const |
|
KyUInt32 | GetActiveAbstractGraphChangeIdx () const |
|
KyUInt32 | GetActiveDatabaseChangeIdx () 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::Database::BuildVisualGeometry |
( |
bool |
forceRebuildAll = false | ) |
|
|
inline |
Sends to the IVisualGeometry or to the IVisualGeometry of the DatabaseGeometryBuildingManager (depending on what you provided) a set of triangles that express the data maintained by this object for rendering.
void Kaim::Database::BuildVisualGeometry |
( |
Ptr< IVisualGeometry > |
geometry, |
|
|
const DatabaseVisualGeometryBuilderConfig & |
config = DatabaseVisualGeometryBuilderConfig() |
|
) |
| |
Sends to the IVisualGeometry provided in the function a set of triangles that express the data maintained.
by providing DatabaseVisualGeometryBuilderConfig.
void Kaim::Database::Clear |
( |
| ) |
|
internal, use World::ClearDatabase(KyUInt32 databaseIndex). RemoveAll navData, bots, clear memory of cell grid, activeData and GenerationMetrics
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).
Retrieves the DatabaseGenMetrics, which offers services for converting between floating-point coordinates and the integer coordinate system used internally by the NavData.
DatabaseGeometryBuildingManager& Kaim::Database::GetDatabaseGeometryBuildingManager |
( |
| ) |
|
|
inline |
Retrieves the instance of the DatabaseGeometryBuildingManager maintained by this object, which manage the tiling of DatabaseVisualGeometryBuilder.
KyUInt32 Kaim::Database::GetDatabaseIndex |
( |
| ) |
const |
|
inline |
Retrieves the index of the Database in the array of Databases maintained by the World.
PerformQueryStatistics* Kaim::Database::GetPerformQueryStatistics |
( |
| ) |
|
|
inline |
Return statistics on queries called on this Database.
VisualDebugServer * Kaim::Database::GetVisualDebugServer |
( |
| ) |
const |
Get the VisualDebugServer.
WorkingMemory* Kaim::Database::GetWorkingMemory |
( |
| ) |
const |
|
inline |
The WorkingMemory used by default by Queries when processed outside a QueryQueue. You should not need.
bool Kaim::Database::IsClear |
( |
| ) |
const |
|
inline |
Returns true if the Database is not associated to any set of generation parameters.
It false is returned, it means that only NavData compatible with current generation parameters can be added. In this case, you can use the function IsCompatibleWith to check that. Note that Databases are cleared only during a call to World::RemoveAndCancellAll()
bool Kaim::Database::IsCompatibleWith |
( |
const NavData & |
navData | ) |
const |
Indicates whether or not the specified NavData object was created with the same generation parameters as the NavData objects that have already been loaded into this Database so that it can be added too.
void Kaim::Database::RemoveAllNavDataImmediate |
( |
| ) |
|
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.
Sets the instance of IVisualGeometry to which this object will send its triangles for rendering when ComputeVisualGeometry() is called.
all the data that are active
bookkeeping, stitching, spatialization, NavCells version management, ...
NavGraphManager* Kaim::Database::m_navGraphManager |
NavMesh container + GUID manager/sorter.
bool Kaim::Database::m_needToSendActiveNavData |
(VisualDebug) Avoids sending all the active NavData each frame. Accessed by the NavCellGrid.
Collection<Ptr<BaseBlobHandler> > Kaim::Database::m_visualDebugBlobCollection |
(VisualDebug) store the blob to be send during the DoSendVisualDebug call.
The documentation for this class was generated from the following files:
- gwnavruntime/database/database.h
- gwnavruntime/database/database.cpp