A* Pathfinding Project  4.3.2
The A* Pathfinding Project for Unity 3D
JobRVO Struct Reference

Classes

struct  HalfPlane
 
struct  VO
 Velocity Obstacle. More...
 
struct  VO2
 

Public Member Functions

void DebugTrace (int agentIndex, float2 prev, float2 current, int stepIndex)
 
float2 EvaluateGradient (int agentIndex, NativeSlice< VelocityObstacle > vos, float2 p, out float value, float2 desiredVelocity)
 Evaluate gradient and value of the cost function at velocity p. More...
 
void Execute (int startIndex, int batchSize)
 
int GenerateNeighbourAgentVOs (int agentIndex, NativeArray< VelocityObstacle > velocityObstacles, NativeSlice< int > neighbours)
 
float2 GradientDescent (int agentIndex, NativeSlice< VelocityObstacle > vos, float2 sampleAround1, float2 sampleAround2, float2 desiredVelocity)
 
float2 Trace (int agentIndex, NativeSlice< VelocityObstacle > vos, float2 p, out float score, float2 desiredVelocity, int iterations, float stepSize)
 Traces the vector field constructed out of the velocity obstacles. More...
 

Static Public Member Functions

static bool BiasDesiredVelocity (NativeSlice< VelocityObstacle > vos, ref float2 desiredVelocity, ref float2 targetPointInVelocitySpace, float maxBiasRadians)
 Bias towards the right side of agents. More...
 
static void DrawVO (float2 circleCenter, float radius, float2 origin)
 
static Vector3 FromXZ (float2 p)
 (x, 0, y) More...
 
static Color Rainbow (float v)
 
static float Sqr (float x)
 

Public Attributes

SimulatorBurst.AgentData agentData
 
float collisionStrength
 Should be in the range [0,1]. More...
 
float deltaTime
 
const float DesiredVelocityWeight = 0.1f
 
const int MaxObstacleCount = 50
 
SimulatorBurst.AgentOutputData output
 
RVOQuadtreeBurst quadtree
 
float symmetryBreakingBias
 
SimulatorBurst.TemporaryAgentData temporaryAgentData
 

Properties

bool allowBoundsChecks [get]
 
- Properties inherited from IJobParallelForBatch
bool allowBoundsChecks [get]
 

Member Function Documentation

◆ BiasDesiredVelocity()

static bool BiasDesiredVelocity ( NativeSlice< VelocityObstacle vos,
ref float2  desiredVelocity,
ref float2  targetPointInVelocitySpace,
float  maxBiasRadians 
)
static

Bias towards the right side of agents.

Rotate desiredVelocity at most [value] number of radians. 1 radian ≈ 57° This breaks up symmetries.

The desired velocity will only be rotated if it is inside a velocity obstacle (VO). If it is inside one, it will not be rotated further than to the edge of it

The targetPointInVelocitySpace will be rotated by the same amount as the desired velocity

Returns
True if the desired velocity was inside any VO

◆ DebugTrace()

void DebugTrace ( int  agentIndex,
float2  prev,
float2  current,
int  stepIndex 
)

◆ DrawVO()

static void DrawVO ( float2  circleCenter,
float  radius,
float2  origin 
)
static

◆ EvaluateGradient()

float2 EvaluateGradient ( int  agentIndex,
NativeSlice< VelocityObstacle vos,
float2  p,
out float  value,
float2  desiredVelocity 
)

Evaluate gradient and value of the cost function at velocity p.

◆ Execute()

void Execute ( int  startIndex,
int  batchSize 
)

Implements IJobParallelForBatch.

◆ FromXZ()

static Vector3 FromXZ ( float2  p)
static

(x, 0, y)

◆ GenerateNeighbourAgentVOs()

int GenerateNeighbourAgentVOs ( int  agentIndex,
NativeArray< VelocityObstacle velocityObstacles,
NativeSlice< int >  neighbours 
)

◆ GradientDescent()

float2 GradientDescent ( int  agentIndex,
NativeSlice< VelocityObstacle vos,
float2  sampleAround1,
float2  sampleAround2,
float2  desiredVelocity 
)

◆ Rainbow()

static Color Rainbow ( float  v)
static

◆ Sqr()

static float Sqr ( float  x)
static

◆ Trace()

float2 Trace ( int  agentIndex,
NativeSlice< VelocityObstacle vos,
float2  p,
out float  score,
float2  desiredVelocity,
int  iterations,
float  stepSize 
)

Traces the vector field constructed out of the velocity obstacles.

Returns the position which gives the minimum score (approximately).

See also
https://en.wikipedia.org/wiki/Gradient_descent

Member Data Documentation

◆ agentData

◆ collisionStrength

float collisionStrength

Should be in the range [0,1].

◆ deltaTime

float deltaTime

◆ DesiredVelocityWeight

const float DesiredVelocityWeight = 0.1f

◆ MaxObstacleCount

const int MaxObstacleCount = 50

◆ output

◆ quadtree

RVOQuadtreeBurst quadtree

◆ symmetryBreakingBias

float symmetryBreakingBias

◆ temporaryAgentData

Property Documentation

◆ allowBoundsChecks

bool allowBoundsChecks
get

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