Dungeon Architect  17.0.0
SharpNav.Crowds.ObstacleAvoidanceQuery Class Reference

Classes

struct  ObstacleAvoidanceParams
 

Public Member Functions

 ObstacleAvoidanceQuery (int maxCircles, int maxSegments)
 Initializes a new instance of the ObstacleAvoidanceQuery class. More...
 
void Reset ()
 Resets the ObstacleAvoidanceQuery's internal data More...
 
void AddCircle (Vector3 pos, float rad, Vector3 vel, Vector3 dvel)
 Add a new circle to the array More...
 
void AddSegment (Vector3 p, Vector3 q)
 Add a segment to the array More...
 
void Prepare (Vector3 position, Vector3 desiredVel)
 Prepare the obstacles for further calculations More...
 
float ProcessSample (Vector3 vcand, float cs, Vector3 position, float radius, Vector3 vel, Vector3 desiredVel)
 
bool SweepCircleCircle (Vector3 center0, float radius0, Vector3 v, Vector3 center1, float radius1, ref float tmin, ref float tmax)
 
bool IntersectRaySegment (Vector3 ap, Vector3 u, Vector3 bp, Vector3 bq, ref float t)
 Determine whether the ray intersects the segment More...
 
int SampleVelocityGrid (Vector3 pos, float rad, float vmax, Vector3 vel, Vector3 desiredVel, ref Vector3 nvel, ObstacleAvoidanceParams parameters)
 
int SampleVelocityAdaptive (Vector3 position, float radius, float vmax, Vector3 vel, Vector3 desiredVel, ref Vector3 nvel, ObstacleAvoidanceParams parameters)
 

Detailed Description

Definition at line 17 of file ObstacleAvoidanceQuery.cs.

Constructor & Destructor Documentation

◆ ObstacleAvoidanceQuery()

SharpNav.Crowds.ObstacleAvoidanceQuery.ObstacleAvoidanceQuery ( int  maxCircles,
int  maxSegments 
)

Initializes a new instance of the ObstacleAvoidanceQuery class.

Parameters
maxCirclesThe maximum number of circles
maxSegmentsThe maximum number of segments

Definition at line 46 of file ObstacleAvoidanceQuery.cs.

Member Function Documentation

◆ AddCircle()

void SharpNav.Crowds.ObstacleAvoidanceQuery.AddCircle ( Vector3  pos,
float  rad,
Vector3  vel,
Vector3  dvel 
)

Add a new circle to the array

Parameters
posThe position
radThe radius
velThe velocity
dvelThe desired velocity

Definition at line 77 of file ObstacleAvoidanceQuery.cs.

◆ AddSegment()

void SharpNav.Crowds.ObstacleAvoidanceQuery.AddSegment ( Vector3  p,
Vector3  q 
)

Add a segment to the array

Parameters
pOne endpoint
qThe other endpoint

Definition at line 94 of file ObstacleAvoidanceQuery.cs.

◆ IntersectRaySegment()

bool SharpNav.Crowds.ObstacleAvoidanceQuery.IntersectRaySegment ( Vector3  ap,
Vector3  u,
Vector3  bp,
Vector3  bq,
ref float  t 
)

Determine whether the ray intersects the segment

Parameters
apA point
uA vector
bpSegment B endpoint
bqAnother one of segment B's endpoints
tThe parameter t
Returns
True if intersect, false if not

Definition at line 263 of file ObstacleAvoidanceQuery.cs.

◆ Prepare()

void SharpNav.Crowds.ObstacleAvoidanceQuery.Prepare ( Vector3  position,
Vector3  desiredVel 
)

Prepare the obstacles for further calculations

Parameters
positionCurrent position
desiredVelDesired velocity

Definition at line 109 of file ObstacleAvoidanceQuery.cs.

◆ Reset()

void SharpNav.Crowds.ObstacleAvoidanceQuery.Reset ( )

Resets the ObstacleAvoidanceQuery's internal data

Definition at line 64 of file ObstacleAvoidanceQuery.cs.


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