A* Pathfinding Project  3.1.4
The A* Pathfinding Project for Unity 3D
 All Classes Namespaces Files Functions Variables Enumerations Properties Groups Pages
RVONavmesh Class Reference

Adds a navmesh as RVO obstacles. More...

+ Inheritance diagram for RVONavmesh:
+ Collaboration diagram for RVONavmesh:

Public Member Functions

void AddGraphObstacles (Pathfinding.RVO.Simulator sim, NavGraph graph)
 Adds obstacles for a graph.
 
override void OnLatePostScan ()
 Called at the end of the scanning procedure.
 
override void OnPostCacheLoad ()
 Called after cached graphs have been loaded.
 
void RemoveObstacles ()
 Removes obstacles which were added with AddGraphObstacles.
 
- Public Member Functions inherited from GraphModifier
virtual void OnDisable ()
 Removes this modifier from list of active modifiers.
 
virtual void OnEnable ()
 Adds this modifier to list of active modifiers.
 
virtual void OnGraphsPostUpdate ()
 Called after graphs have been updated using GraphUpdateObjects.
 
virtual void OnGraphsPreUpdate ()
 Called before graphs are updated using GraphUpdateObjects.
 
virtual void OnPostScan ()
 Called right after all graphs have been scanned.
 
virtual void OnPreScan ()
 Called right before graphs are going to be scanned.
 

Public Attributes

float wallHeight = 5
 Height of the walls added for each obstacle edge.
 

Private Attributes

Simulator lastSim = null
 Last simulator used.
 
List< ObstacleVertexobstacles = new List<ObstacleVertex>()
 Obstacles currently added to the simulator.
 

Additional Inherited Members

- Public Types inherited from GraphModifier
enum  EventType {
  PostScan, PreScan, LatePostScan, PreUpdate,
  PostUpdate, PostCacheLoad
}
 GraphModifier event type. More...
 
- Static Public Member Functions inherited from GraphModifier
static void TriggerEvent (GraphModifier.EventType type)
 Triggers an event for all active graph modifiers.
 

Detailed Description

Adds a navmesh as RVO obstacles.

Add this to a scene in which has a navmesh based graph, when scanning (or loading from cache) the graph it will be added as RVO obstacles to the RVOSimulator (which must exist in the scene).

Todo:
Support for grid based graphs will be added in future versions

Member Function Documentation

override void OnLatePostScan ( )
virtual

Called at the end of the scanning procedure.

This is the absolute last thing done by Scan.

Note
This event will be called even if Script Execution Order has messed things up (see the other two scan events).

Reimplemented from GraphModifier.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

override void OnPostCacheLoad ( )
virtual

Called after cached graphs have been loaded.

When using cached startup, this event is analogous to OnLatePostScan and implementing scripts should do roughly the same thing for both events.

Note
This event will be called even if Script Execution Order has messed things up (see the other two scan events).

Reimplemented from GraphModifier.

+ Here is the call graph for this function:

Member Data Documentation

float wallHeight = 5

Height of the walls added for each obstacle edge.

If a graph contains overlapping you should set this low enough so that edges on different levels do not interfere, but high enough so that agents cannot move over them by mistake.


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