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

Classes

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

Public Member Functions

bool BiasDesiredVelocity (NativeArray< ORCALine > lines, int numLines, ref float2 desiredVelocity, ref float2 targetPointInVelocitySpace, float maxBiasRadians)
 Bias towards the right side of agents. More...
 
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)
 
void ExecuteORCA (int startIndex, int batchSize)
 
void ExecuteSampled (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)
 
bool LinearProgram1 (NativeArray< ORCALine > lines, int lineIndex, float radius, float2 optimalVelocity, bool directionOpt, ref float2 result)
 
LinearProgram2Output LinearProgram2 (NativeArray< ORCALine > lines, int numLines, float radius, float2 optimalVelocity, bool directionOpt)
 
void LinearProgram3 (NativeArray< ORCALine > lines, int numLines, int numFixedLines, int beginLine, float radius, ref float2 result, NativeArray< ORCALine > scratchBuffer)
 
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 float det (float2 vector1, float2 vector2)
 
static void DrawVO (CommandBuilder draw, 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
 
CommandBuilder draw
 
const int MaxObstacleCount = 50
 
SimulatorBurst.AgentOutputData output
 
RVOQuadtreeBurst quadtree
 
float symmetryBreakingBias
 
SimulatorBurst.TemporaryAgentData temporaryAgentData
 

Properties

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

Member Function Documentation

◆ BiasDesiredVelocity() [1/2]

bool BiasDesiredVelocity ( NativeArray< ORCALine lines,
int  numLines,
ref float2  desiredVelocity,
ref float2  targetPointInVelocitySpace,
float  maxBiasRadians 
)

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

◆ BiasDesiredVelocity() [2/2]

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 
)

◆ det()

static float det ( float2  vector1,
float2  vector2 
)
static

◆ DrawVO()

static void DrawVO ( CommandBuilder  draw,
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 
)

◆ ExecuteORCA()

void ExecuteORCA ( int  startIndex,
int  batchSize 
)

◆ ExecuteSampled()

void ExecuteSampled ( int  startIndex,
int  batchSize 
)

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

◆ LinearProgram1()

bool LinearProgram1 ( NativeArray< ORCALine lines,
int  lineIndex,
float  radius,
float2  optimalVelocity,
bool  directionOpt,
ref float2  result 
)

◆ LinearProgram2()

LinearProgram2Output LinearProgram2 ( NativeArray< ORCALine lines,
int  numLines,
float  radius,
float2  optimalVelocity,
bool  directionOpt 
)

◆ LinearProgram3()

void LinearProgram3 ( NativeArray< ORCALine lines,
int  numLines,
int  numFixedLines,
int  beginLine,
float  radius,
ref float2  result,
NativeArray< ORCALine scratchBuffer 
)

◆ 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

◆ draw

◆ 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: