Drag[en]gine Game Engine
1.21
|
Navigation Space. Defines a space for AI navigation. A navigation space composes of a list of nodes and connections between them. Navigation spaces can be either grids, meshes or volumes. In addition each navigation space has a layer number. Navigation spaces with the same layer number are linked together. Using different layers different navigation spaces can be used side by side in the same world. This can be due to different requirements of game entities or to use spaces of varying resolution. The navigation grid is the default type for newly created navigation spaces. More...
#include <deNavigationSpace.h>
Public Types | |
enum | eSpaceTypes { estGrid , estMesh , estVolume } |
Space Type. More... | |
typedef deTObjectReference< deNavigationSpace > | Ref |
Type holding strong reference. More... | |
Public Types inherited from deResource | |
typedef deTObjectReference< deResource > | Ref |
Type holding strong reference. More... | |
Public Types inherited from deObject | |
typedef deTObjectReference< deObject > | Ref |
Type holding strong reference. More... | |
Public Member Functions | |
Management | |
eSpaceTypes | GetType () const |
Space type. More... | |
void | SetType (eSpaceTypes type) |
Set space type. More... | |
int | GetLayer () const |
Layer number. More... | |
void | SetLayer (int layer) |
Set layer number. More... | |
const decDVector & | GetPosition () const |
Position. More... | |
void | SetPosition (const decDVector &position) |
Set position. More... | |
const decQuaternion & | GetOrientation () const |
Orientation. More... | |
void | SetOrientation (const decQuaternion &orientation) |
Set orientation. More... | |
float | GetSnapDistance () const |
Snap distance in meters up to which edges are linked to neighbor spaces. More... | |
void | SetSnapDistance (float distance) |
Set snap distance in meters up to which edges are linked to neighbor spaces. More... | |
float | GetSnapAngle () const |
Snap angle in radians up to which edges are linked to neighbor spaces. More... | |
void | SetSnapAngle (float angle) |
Set snap angle in radians up to which edges are linked to neighbor spaces. More... | |
decShapeList & | GetBlockerShapeList () |
Blocker shape list. More... | |
const decShapeList & | GetBlockerShapeList () const |
void | NotifyBlockerShapeListChanged () |
Notifies the peers that the blocker shape list changed. More... | |
int | GetBlockingPriority () const |
Blocking priority. More... | |
void | SetBlockingPriority (int priority) |
Set blocking priority. More... | |
void | NotifyLayoutChanged () |
bool | Verify () const |
Verify the navigation space. More... | |
Vertices | |
int | GetVertexCount () const |
Number of vertices. More... | |
void | SetVertexCount (int count) |
Set number of vertices. More... | |
const decVector & | GetVertexAt (int index) const |
Vertex at the given position. More... | |
void | SetVertexAt (int index, const decVector &vertex) |
Set vertex at the given position. More... | |
decVector * | GetVertices () const |
Pointer to the vertices. More... | |
Edges | |
int | GetEdgeCount () const |
Number of edges. More... | |
void | SetEdgeCount (int count) |
Set number of edges. More... | |
deNavigationSpaceEdge & | GetEdgeAt (int index) const |
Edge at the given position. More... | |
deNavigationSpaceEdge * | GetEdges () const |
Pointer to the edges. More... | |
Corners | |
int | GetCornerCount () const |
Number of corners. More... | |
void | SetCornerCount (int count) |
Set number of corners. More... | |
deNavigationSpaceCorner & | GetCornerAt (int index) const |
Corner at the given position. More... | |
deNavigationSpaceCorner * | GetCorners () const |
Pointer to the corners. More... | |
Faces | |
int | GetFaceCount () const |
Number of faces. More... | |
void | SetFaceCount (int count) |
Set number of faces. More... | |
deNavigationSpaceFace & | GetFaceAt (int index) const |
Face at the given position. More... | |
deNavigationSpaceFace * | GetFaces () const |
Pointer to the faces. More... | |
Walls | |
int | GetWallCount () const |
Number of walls. More... | |
void | SetWallCount (int count) |
Set number of walls. More... | |
deNavigationSpaceWall & | GetWallAt (int index) const |
Wall at the given position. More... | |
deNavigationSpaceWall * | GetWalls () const |
Pointer to the walls. More... | |
Rooms | |
int | GetRoomCount () const |
Number of rooms. More... | |
void | SetRoomCount (int count) |
Set number of rooms. More... | |
deNavigationSpaceRoom & | GetRoomAt (int index) const |
Room at the given position. More... | |
deNavigationSpaceRoom * | GetRooms () const |
Pointer to the rooms. More... | |
System Peers | |
deBaseAINavigationSpace * | GetPeerAI () const |
AI system peer. More... | |
void | SetPeerAI (deBaseAINavigationSpace *peer) |
Set AI system peer. More... | |
Linked List | |
deWorld * | GetParentWorld () const |
Parent world or NULL. More... | |
void | SetParentWorld (deWorld *world) |
Set parent world or NULL. More... | |
deNavigationSpace * | GetLLWorldPrev () const |
Previous navigation space in the parent world linked list. More... | |
void | SetLLWorldPrev (deNavigationSpace *navspace) |
Set next navigation space in the parent world linked list. More... | |
deNavigationSpace * | GetLLWorldNext () const |
Next navigation space in the parent world linked list. More... | |
void | SetLLWorldNext (deNavigationSpace *navspace) |
Set next navigation space in the parent world linked list. More... | |
Public Member Functions inherited from deResource | |
deResourceManager * | GetResourceManager () const |
Resource manager or NULL if resource is leaking. More... | |
deEngine * | GetEngine () const |
Game engine object from resource manager. More... | |
deResource * | GetLLManagerPrev () const |
Previous resource in the resource manager linked list. More... | |
void | SetLLManagerPrev (deResource *resource) |
Set next resource in the resource manager linked list. More... | |
deResource * | GetLLManagerNext () const |
Next resource in the resource manager linked list. More... | |
void | SetLLManagerNext (deResource *resource) |
Set next resource in the resource manager linked list. More... | |
void | MarkLeaking () |
Marks the resource leaking. More... | |
deResource (deResourceManager *resourceManager) | |
Create resource. More... | |
Public Member Functions inherited from deObject | |
int | GetRefCount () const |
Reference count. More... | |
void | AddReference () |
Add reference increasing reference count by 1. More... | |
void | FreeReference () |
Decrease reference count by one and delete object if count reaches 0. More... | |
deObject () | |
Create object with reference count of 1. More... | |
Constructors and Destructors | |
deNavigationSpace (deNavigationSpaceManager *manager) | |
Create new navigation space with the given resource manager. More... | |
virtual | ~deNavigationSpace () |
Clean up animator. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from deResource | |
virtual | ~deResource () |
Clean up resource. More... | |
Protected Member Functions inherited from deObject | |
virtual | ~deObject () |
Clean up object. More... | |
Navigation Space. Defines a space for AI navigation. A navigation space composes of a list of nodes and connections between them. Navigation spaces can be either grids, meshes or volumes. In addition each navigation space has a layer number. Navigation spaces with the same layer number are linked together. Using different layers different navigation spaces can be used side by side in the same world. This can be due to different requirements of game entities or to use spaces of varying resolution. The navigation grid is the default type for newly created navigation spaces.
Type holding strong reference.
deNavigationSpace::deNavigationSpace | ( | deNavigationSpaceManager * | manager | ) |
Create new navigation space with the given resource manager.
|
protectedvirtual |
Clean up animator.
|
inline |
Blocker shape list.
|
inline |
|
inline |
Blocking priority.
Navigation meshes is blocked by all blockers with an equal or larger blocking priority. If a blocker shape exists it blocks all navigation meshes with equal or less blocking priority.
deNavigationSpaceCorner& deNavigationSpace::GetCornerAt | ( | int | index | ) | const |
Corner at the given position.
|
inline |
Number of corners.
|
inline |
Pointer to the corners.
deNavigationSpaceEdge& deNavigationSpace::GetEdgeAt | ( | int | index | ) | const |
Edge at the given position.
|
inline |
Number of edges.
|
inline |
Pointer to the edges.
deNavigationSpaceFace& deNavigationSpace::GetFaceAt | ( | int | index | ) | const |
Face at the given position.
|
inline |
Number of faces.
|
inline |
Pointer to the faces.
|
inline |
Layer number.
|
inline |
Next navigation space in the parent world linked list.
|
inline |
Previous navigation space in the parent world linked list.
|
inline |
Orientation.
|
inline |
Parent world or NULL.
|
inline |
AI system peer.
|
inline |
Position.
deNavigationSpaceRoom& deNavigationSpace::GetRoomAt | ( | int | index | ) | const |
Room at the given position.
|
inline |
Number of rooms.
|
inline |
Pointer to the rooms.
|
inline |
Snap angle in radians up to which edges are linked to neighbor spaces.
The default snap angle is 180° in radians.
|
inline |
Snap distance in meters up to which edges are linked to neighbor spaces.
The default snap distance is 0.001 (1mm).
|
inline |
Space type.
const decVector& deNavigationSpace::GetVertexAt | ( | int | index | ) | const |
Vertex at the given position.
|
inline |
Number of vertices.
|
inline |
Pointer to the vertices.
deNavigationSpaceWall& deNavigationSpace::GetWallAt | ( | int | index | ) | const |
Wall at the given position.
|
inline |
Number of walls.
|
inline |
Pointer to the walls.
void deNavigationSpace::NotifyBlockerShapeListChanged | ( | ) |
Notifies the peers that the blocker shape list changed.
void deNavigationSpace::NotifyLayoutChanged | ( | ) |
Notifies the peers that the layout of the navigation space changed. This has to be called after changes made to vertices, corners, faces, walls or rooms or if the space type has been changed. Call this after all changes have been done.
void deNavigationSpace::SetBlockingPriority | ( | int | priority | ) |
Set blocking priority.
Navigation meshes is blocked by all blockers with an equal or larger blocking priority. If a blocker shape exists it blocks all navigation meshes with equal or less blocking priority.
void deNavigationSpace::SetCornerCount | ( | int | count | ) |
Set number of corners.
void deNavigationSpace::SetEdgeCount | ( | int | count | ) |
Set number of edges.
void deNavigationSpace::SetFaceCount | ( | int | count | ) |
Set number of faces.
void deNavigationSpace::SetLayer | ( | int | layer | ) |
Set layer number.
void deNavigationSpace::SetLLWorldNext | ( | deNavigationSpace * | navspace | ) |
Set next navigation space in the parent world linked list.
void deNavigationSpace::SetLLWorldPrev | ( | deNavigationSpace * | navspace | ) |
Set next navigation space in the parent world linked list.
void deNavigationSpace::SetOrientation | ( | const decQuaternion & | orientation | ) |
Set orientation.
void deNavigationSpace::SetParentWorld | ( | deWorld * | world | ) |
Set parent world or NULL.
void deNavigationSpace::SetPeerAI | ( | deBaseAINavigationSpace * | peer | ) |
Set AI system peer.
void deNavigationSpace::SetPosition | ( | const decDVector & | position | ) |
Set position.
void deNavigationSpace::SetRoomCount | ( | int | count | ) |
Set number of rooms.
void deNavigationSpace::SetSnapAngle | ( | float | angle | ) |
Set snap angle in radians up to which edges are linked to neighbor spaces.
The default snap angle is 180° in radians.
void deNavigationSpace::SetSnapDistance | ( | float | distance | ) |
Set snap distance in meters up to which edges are linked to neighbor spaces.
The default snap distance is 0.001 (1mm).
void deNavigationSpace::SetType | ( | eSpaceTypes | type | ) |
Set space type.
void deNavigationSpace::SetVertexAt | ( | int | index, |
const decVector & | vertex | ||
) |
Set vertex at the given position.
void deNavigationSpace::SetVertexCount | ( | int | count | ) |
Set number of vertices.
void deNavigationSpace::SetWallCount | ( | int | count | ) |
Set number of walls.
bool deNavigationSpace::Verify | ( | ) | const |
Verify the navigation space.