Kaim::PointOfInterest Class Reference

Kaim::PointOfInterest Class Reference

#include <pointofinterest.h>

Class Description

PointOfInterest is a tagged position spatialized into the NavMesh.

You can use this for special interest positions that can be easily retrieved nearby your Bots (they can be, for example, cover points).

This is purely runtime and dynamic: points of interest are spawned like the other WorldElements (Bot, BoxObstacle, etc.), and can be moved as well.

+ Examples:

Inherits Kaim::WorldElement.

Main API Functions

 PointOfInterest ()
 
 PointOfInterest (const PointOfInterestInitConfig &initConfig)
 
 ~PointOfInterest ()
 
void Init (const PointOfInterestInitConfig &initConfig)
 
void Clear ()
 
void AddToWorld ()
 
void RemoveFromWorld ()
 
void SetPosition (const Vec3f &position)
 

Getters

const SpatializedPointGetSpatializedPoint () const
 
void * GetPointOfInterestData () const
 
KyUInt32 GetPointOfInterestType () const
 

For internal use only

virtual void DoSendVisualDebug (VisualDebugServer &server, VisualDebugSendChangeEvent changeEvent)
 
void UpdateSpatialization ()
 

Main API Functions

bool IsAddedToWorld () const
 
WorldGetWorld () const
 
KyUInt32 GetVisualDebugId () const
 
void * GetUserData () const
 
void SetUserData (void *userData)
 

Visual Debug

void SetCurrentVisualDebugLOD (VisualDebugLOD lod)
 
VisualDebugLOD GetCurrentVisualDebugLOD () const
 
VisualDebugLOD GetPreviousVisualDebugLod () const
 
void SendVisualDebug (VisualDebugServer &server)
 
void ForceSendAllVisualDebug ()
 

For internal use only

void SendForMaxLevelOfDetail (VisualDebugServer &server, const Vec3f &shapePosition)
 
void RegisterToVisualDebug ()
 
void UnRegisterFromVisualDebug ()
 
KyUInt32 GetIndexInCollection () const
 
void SetIndexInCollection (KyUInt32 indexInCollection)
 

Member Function Documentation

void Kaim::PointOfInterest::AddToWorld ( )

Adds the PointOfInterest to the World.

It becomes active in the simulation, it is updated, it is made available for retrieval through queries, and the RefCount of this instance is incremented by 1.

NOTE: this method has immediate effect: ensure to call this outside of any Gameware 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::PointOfInterest::Clear ( )

Prepares this instance to destruction and / or reuse: sets all members to their default values and clears the SpatializedPoint.

void Kaim::WorldElement::ForceSendAllVisualDebug ( )
inherited

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).

void Kaim::PointOfInterest::Init ( const PointOfInterestInitConfig initConfig)

Sets m_world and allocates memory depending on m_databaseBinding.

It does not add the PointOfInterest to the world, and it does not modify the world.

If m_world is already set, the PointOfInterest is first removed from m_world.

Asserts if initConfig.m_world == NULL

+ Examples:
void Kaim::PointOfInterest::RemoveFromWorld ( )

Removes the PointOfInterest from the World.

It is removed from the simulation, it is no longer updated, it cannot be retrieved, and the RefCount of this instance is decremented by 1.

NOTE: this method has immediate effect: ensure to call this outside of any Gameware Navigation computation (Kaim::World::Update or threaded query computation). The spatialization information are immediately invalidated too.

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.


The documentation for this class was generated from the following file: