|
static bool | IntersectionFactor (Vector2 start1, Vector2 dir1, Vector2 start2, Vector2 dir2, out float factor) |
| Returns the intersection factors for line 1 and line 2.
|
|
|
float | AgentTimeHorizon [get, set] |
|
RVOLayer | CollidesWith [get, set] |
|
bool | DebugDraw [get, set] |
|
Vector3 | DesiredVelocity [get, set] |
|
float | Height [get, set] |
|
Vector3 | InterpolatedPosition [get] |
|
RVOLayer | Layer [get, set] |
|
bool | Locked [get, set] |
|
int | MaxNeighbours [get, set] |
|
float | MaxSpeed [get, set] |
|
float | NeighbourDist [get, set] |
|
List< ObstacleVertex > | NeighbourObstacles [get] |
|
float | ObstacleTimeHorizon [get, set] |
|
Vector3 | Position [get, set] |
|
float | Radius [get, set] |
|
Vector3 | Velocity [get, set] |
|
float | AgentTimeHorizon [get, set] |
| Max number of estimated seconds to look into the future for collisions with agents.
|
|
RVOLayer | CollidesWith [get, set] |
| Layer mask specifying which layers this agent will avoid.
|
|
bool | DebugDraw [get, set] |
| Debug drawing.
|
|
Vector3 | DesiredVelocity [get, set] |
| Desired velocity of the agent.
|
|
float | Height [get, set] |
| Height of the agent.
|
|
Vector3 | InterpolatedPosition [get] |
| Interpolated position of agent.
|
|
RVOLayer | Layer [get, set] |
| Specifies the avoidance layer for this agent.
|
|
bool | Locked [get, set] |
| Locked agents will not move.
|
|
int | MaxNeighbours [get, set] |
| Max number of agents to take into account.
|
|
float | MaxSpeed [get, set] |
| Max speed of the agent.
|
|
float | NeighbourDist [get, set] |
| Max distance to other agents to take them into account.
|
|
List< ObstacleVertex > | NeighbourObstacles [get] |
| List of obstacle segments which were close to the agent during the last simulation step.
|
|
float | ObstacleTimeHorizon [get, set] |
| Max number of estimated seconds to look into the future for collisions with obstacles.
|
|
Vector3 | Position [get] |
| Position of the agent.
|
|
float | Radius [get, set] |
| Radius of the agent.
|
|
Vector3 | Velocity [get, set] |
| Velocity of the agent.
|
|
|
float | Sqr (float x) |
|
Vector2 | Trace (VO[] vos, int voCount, Vector2 p, float cutoff, out float score) |
| Traces the vector field constructed out of the velocity obstacles.
|
|
|
static void | DrawCircle (Vector2 _p, float radius, Color col) |
|
static void | DrawCircle (Vector2 _p, float radius, float a0, float a1, Color col) |
|
static void | DrawCross (Vector2 p, float size=1) |
|
static void | DrawCross (Vector2 p, Color col, float size=1) |
|
static void | DrawVO (Vector2 circleCenter, float radius, Vector2 origin) |
|
static Color | Rainbow (float v) |
|
static Vector3 | To3D (Vector2 p) |
|
void CalculateNeighbours |
( |
| ) |
|
static void DrawCircle |
( |
Vector2 |
_p, |
|
|
float |
radius, |
|
|
Color |
col |
|
) |
| |
|
staticprivate |
static void DrawCircle |
( |
Vector2 |
_p, |
|
|
float |
radius, |
|
|
float |
a0, |
|
|
float |
a1, |
|
|
Color |
col |
|
) |
| |
|
staticprivate |
static void DrawCross |
( |
Vector2 |
p, |
|
|
float |
size = 1 |
|
) |
| |
|
staticprivate |
static void DrawCross |
( |
Vector2 |
p, |
|
|
Color |
col, |
|
|
float |
size = 1 |
|
) |
| |
|
staticprivate |
static void DrawVO |
( |
Vector2 |
circleCenter, |
|
|
float |
radius, |
|
|
Vector2 |
origin |
|
) |
| |
|
staticprivate |
float InsertAgentNeighbour |
( |
Agent |
agent, |
|
|
float |
rangeSq |
|
) |
| |
void Interpolate |
( |
float |
t | ) |
|
static bool IntersectionFactor |
( |
Vector2 |
start1, |
|
|
Vector2 |
dir1, |
|
|
Vector2 |
start2, |
|
|
Vector2 |
dir2, |
|
|
out float |
factor |
|
) |
| |
|
static |
Returns the intersection factors for line 1 and line 2.
The intersection factors is a distance along the line start - end where the other line intersects it.
intersectionPoint = start1 + factor1 * (end1-start1)
intersectionPoint2 = start2 + factor2 * (end2-start2)
Lines are treated as infinite.
false is returned if the lines are parallel and true if they are not.
static Color Rainbow |
( |
float |
v | ) |
|
|
staticprivate |
void SetYPosition |
( |
float |
yCoordinate | ) |
|
void Teleport |
( |
Vector3 |
pos | ) |
|
static Vector3 To3D |
( |
Vector2 |
p | ) |
|
|
staticprivate |
Vector2 Trace |
( |
VO[] |
vos, |
|
|
int |
voCount, |
|
|
Vector2 |
p, |
|
|
float |
cutoff, |
|
|
out float |
score |
|
) |
| |
|
private |
Traces the vector field constructed out of the velocity obstacles.
Returns the position which gives the minimum score (approximately).
float DesiredVelocityScale = 0.1f |
|
static |
float DesiredVelocityWeight = 0.02f |
|
static |
float GlobalIncompressibility = 30 |
|
static |
List<float> neighbourDists = new List<float>() |
Used internally for a linked list.
List<float> obstacleDists = new List<float>() |
|
private |
float obstacleTimeHorizon |
|
private |
Simulator which handles this agent.
Used by this script as a reference and to prevent adding this agent to multiple simulations.
const float WallWeight = 5 |
|
private |
Extra weight that walls will have.
System.Diagnostics.Stopwatch watch1 = new System.Diagnostics.Stopwatch() |
|
static |
System.Diagnostics.Stopwatch watch2 = new System.Diagnostics.Stopwatch() |
|
static |
Vector3 InterpolatedPosition |
|
get |
float ObstacleTimeHorizon |
|
getset |
The documentation for this class was generated from the following file:
- /Users/arong/Unity/a-pathfinding-project/Assets/AstarPathfindingProject/Core/RVO/RVOAgent.cs