Class SimulatorBurst Extends ISimulator

Public

Local Avoidance Simulator.

This class handles local avoidance simulation for a number of agents using Reciprocal Velocity Obstacles (RVO) and Optimal Reciprocal Collision Avoidance (ORCA).

This class will handle calculation of velocities from desired velocities supplied by a script. It is, however, not responsible for moving any objects in a Unity Scene. For that there are other scripts (see below).

Agents be added and removed at any time.

You will most likely mostly use the wrapper class RVOSimulator.

A* Pro Feature:

This is an A* Pathfinding Project Pro feature only. This function/class/variable might not exist in the Free version of the A* Pathfinding Project or the functionality might be limited.
The Pro version can be bought here

Inner Types

Holds internal agent data for the local avoidance simulation.

Holds internal obstacle data for the local avoidance simulation.

Public Methods

AddAgent (position)

Add an agent at the specified position.

Public
AddAgent (agent)
Public
AddObstacle (v)
Public
AddObstacle (vertices, height, cycle=true)
Public
AddObstacle (vertices, height, matrix, layer=…, cycle=true)
Public
AddObstacle (a, b, height)
Public
ClearAgents ()

Removes all agents from the simulation.

Public
GetAgents ()

Get a list of all agents.

Public
GetObstacles ()

Get a list of all obstacles.

Public
OnDestroy ()

Frees all used memory.

Public
RemoveAgent (agent)

Removes a specified agent from this simulation.

Public
RemoveObstacle (v)
Public
SimulatorBurst (doubleBuffering, movementPlane)

Create a new simulator.

Public
Update ()

Should be called once per frame.

Public
UpdateObstacle (obstacle, vertices, matrix)
Public
UpdateObstacles ()

Rebuilds the obstacle tree at next simulation frame.

Public

Public Variables

AgentBounds
Public
AgentCount

Number of agents in the simulation.

Public
AnyAgentHasDebug

True if at least one agent had debug drawing enabled during the previous frame.

Public
DeltaTime
Public
DesiredDeltaTime

Time in seconds between each simulation step.

Public
DoubleBuffering

Use double buffering.

Public
HardCollisions

Use hard collisions.

Public
MovementPlane
Public
Multithreading
Public
SymmetryBreakingBias

Bias agents to pass each other on the right side.

Public
movementPlane

Determines if the XY (2D) or XZ (3D) plane is used for movement.

Public Readonly
obstacleCache

Internal cache for obstacle data.

Public
obstacleData

Internal obstacle data.

Public
obstacles

Obstacles in this simulation.

Public
outputData

Internal simulation data.

Public
quadtree

Quadtree for this simulation.

Public
simulationData

Internal simulation data.

Public

Public Static Variables

MaxBlockingAgentCount
Public Static
MaxNeighbourCount
Public Static
MaxObstacleVertices
Public Static

Private/Protected Members

AllocateAgentSpace ()
Private
BlockUntilSimulationStepIsDone ()

Blocks until separate threads have finished with the current simulation step.

Private
CleanAndUpdateObstaclesIfNecessary ()
Private
CleanObstacles ()
Private
PreCalculation ()
Private
ScheduleCleanObstacles ()
Private
UpdateInternal< T > ()
Private
agentPreCalculationCallbacks
Private
agents

Agents in this simulation.

Private
currentSimulationData

A copy of the the simulationData used when the calculations are running.

Private
deltaTime
Private
desiredDeltaTime

Inverse desired simulation fps.

Private
horizonAgentData
Private
inProgressJob
Private
inProgressOutputData
Private
jobInProgress
Private
lastStep
Private
numAgents

Number of agents in this simulation.

Private
temporaryAgentData
Private

Deprecated Members

AddAgent (position, elevationCoordinate)

Add an agent at the specified position.

Public