메소드 | 설명 | |
---|---|---|
Clear ( ) : void |
Clears the simulation.
|
|
GetNumWorkers ( ) : int |
Returns the count of workers.
|
|
SetNumWorkers ( int numWorkers ) : void |
Sets the number of workers.
|
|
addAgent ( Vector2 position ) : int |
Adds a new agent with default properties to the simulation. *
|
|
addAgent ( Vector2 position, float neighborDist, int maxNeighbors, float timeHorizon, float timeHorizonObst, float radius, float maxSpeed, Vector2 velocity ) : int |
Adds a new agent to the simulation.
|
|
addObstacle ( IList |
Adds a new obstacle to the simulation. To add a "negative" obstacle, e.g. a bounding polygon around * the environment, the vertices should be listed in clockwise order. * |
|
doStep ( ) : float |
Performs a simulation step and updates the two-dimensional * position and two-dimensional velocity of each agent.
|
|
getAgentAgentNeighbor ( int agentNo, int neighborNo ) : int |
Returns the specified agent neighbor of the specified agent. *
|
|
getAgentMaxNeighbors ( int agentNo ) : int |
Returns the maximum neighbor count of a specified agent. *
|
|
getAgentMaxSpeed ( int agentNo ) : float |
Returns the maximum speed of a specified agent.
|
|
getAgentNeighborDist ( int agentNo ) : float |
Returns the maximum neighbor distance of a specified agent. *
|
|
getAgentNumAgentNeighbors ( int agentNo ) : int |
Returns the count of agent neighbors taken into account to * compute the current velocity for the specified agent.
|
|
getAgentNumObstacleNeighbors ( int agentNo ) : int |
Returns the count of obstacle neighbors taken into account * to compute the current velocity for the specified agent.
|
|
getAgentObstacleNeighbor ( int agentNo, int neighborNo ) : int |
Returns the specified obstacle neighbor of the specified * agent.
|
|
getAgentOrcaLines ( int agentNo ) : IList |
Returns the ORCA constraints of the specified agent. * The halfplane to the left of each line is the region of * permissible velocities with respect to that ORCA constraint. * |
|
getAgentPosition ( int agentNo ) : Vector2 |
Returns the two-dimensional position of a specified agent. *
|
|
getAgentPrefVelocity ( int agentNo ) : Vector2 |
Returns the two-dimensional preferred velocity of a * specified agent.
|
|
getAgentRadius ( int agentNo ) : float |
Returns the radius of a specified agent.
|
|
getAgentTimeHorizon ( int agentNo ) : float |
Returns the time horizon of a specified agent.
|
|
getAgentTimeHorizonObst ( int agentNo ) : float |
Returns the time horizon with respect to obstacles of a * specified agent.
|
|
getAgentVelocity ( int agentNo ) : Vector2 |
Returns the two-dimensional linear velocity of a specified * agent.
|
|
getGlobalTime ( ) : float |
Returns the global time of the simulation.
|
|
getNextObstacleVertexNo ( int vertexNo ) : int |
Returns the number of the obstacle vertex succeeding the * specified obstacle vertex in its polygon.
|
|
getNumAgents ( ) : int |
Returns the count of agents in the simulation.
|
|
getNumObstacleVertices ( ) : int |
Returns the count of obstacle vertices in the simulation. *
|
|
getObstacleVertex ( int vertexNo ) : Vector2 |
Returns the two-dimensional position of a specified obstacle * vertex.
|
|
getPrevObstacleVertexNo ( int vertexNo ) : int |
Returns the number of the obstacle vertex preceding the * specified obstacle vertex in its polygon.
|
|
getTimeStep ( ) : float |
Returns the time step of the simulation.
|
|
processObstacles ( ) : void |
Processes the obstacles that have been added so that they * are accounted for in the simulation. Obstacles added to the simulation after this function has * been called are not accounted for in the simulation. |
|
queryVisibility ( Vector2 point1, Vector2 point2, float radius ) : bool |
Performs a visibility query between the two specified points * with respect to the obstacles.
|
|
setAgentDefaults ( float neighborDist, int maxNeighbors, float timeHorizon, float timeHorizonObst, float radius, float maxSpeed, Vector2 velocity ) : void |
Sets the default properties for any new agent that is added. *
|
|
setAgentMaxNeighbors ( int agentNo, int maxNeighbors ) : void |
Sets the maximum neighbor count of a specified agent. *
|
|
setAgentMaxSpeed ( int agentNo, float maxSpeed ) : void |
Sets the maximum speed of a specified agent.
|
|
setAgentNeighborDist ( int agentNo, float neighborDist ) : void |
Sets the maximum neighbor distance of a specified agent. *
|
|
setAgentPosition ( int agentNo, Vector2 position ) : void |
Sets the two-dimensional position of a specified agent. *
|
|
setAgentPrefVelocity ( int agentNo, Vector2 prefVelocity ) : void |
Sets the two-dimensional preferred velocity of a specified * agent.
|
|
setAgentRadius ( int agentNo, float radius ) : void |
Sets the radius of a specified agent.
|
|
setAgentTimeHorizon ( int agentNo, float timeHorizon ) : void |
Sets the time horizon of a specified agent with respect to * other agents.
|
|
setAgentTimeHorizonObst ( int agentNo, float timeHorizonObst ) : void |
Sets the time horizon of a specified agent with respect to * obstacles.
|
|
setAgentVelocity ( int agentNo, Vector2 velocity ) : void |
Sets the two-dimensional linear velocity of a specified * agent.
|
|
setGlobalTime ( float globalTime ) : void |
Sets the global time of the simulation.
|
|
setTimeStep ( float timeStep ) : void |
Sets the time step of the simulation.
|
메소드 | 설명 | |
---|---|---|
Simulator ( ) : System |
Constructs and initializes a simulation.
|
public SetNumWorkers ( int numWorkers ) : void | ||
numWorkers | int | The number of workers. |
리턴 | void |
public addAgent ( Vector2 position ) : int | ||
position | Vector2 | The two-dimensional starting position of this * agent. |
리턴 | int |
public addAgent ( Vector2 position, float neighborDist, int maxNeighbors, float timeHorizon, float timeHorizonObst, float radius, float maxSpeed, Vector2 velocity ) : int | ||
position | Vector2 | The two-dimensional starting position of this * agent. |
neighborDist | float | The maximum distance (center point to * center point) to other agents this agent takes into account in the * navigation. The larger this number, the longer the running time of * the simulation. If the number is too low, the simulation will not be * safe. Must be non-negative. |
maxNeighbors | int | The maximum number of other agents this * agent takes into account in the navigation. The larger this number, * the longer the running time of the simulation. If the number is too * low, the simulation will not be safe. |
timeHorizon | float | The minimal amount of time for which this * agent's velocities that are computed by the simulation are safe with * respect to other agents. The larger this number, the sooner this * agent will respond to the presence of other agents, but the less * freedom this agent has in choosing its velocities. Must be positive. * |
timeHorizonObst | float | The minimal amount of time for which * this agent's velocities that are computed by the simulation are safe * with respect to obstacles. The larger this number, the sooner this * agent will respond to the presence of obstacles, but the less freedom * this agent has in choosing its velocities. Must be positive. |
radius | float | The radius of this agent. Must be non-negative. * |
maxSpeed | float | The maximum speed of this agent. Must be * non-negative. |
velocity | Vector2 | The initial two-dimensional linear velocity of * this agent. |
리턴 | int |
public addObstacle ( IList |
||
vertices | IList |
List of the vertices of the polygonal obstacle * in counterclockwise order. |
리턴 | int |
public getAgentAgentNeighbor ( int agentNo, int neighborNo ) : int | ||
agentNo | int | The number of the agent whose agent neighbor is * to be retrieved. |
neighborNo | int | The number of the agent neighbor to be * retrieved. |
리턴 | int |
public getAgentMaxNeighbors ( int agentNo ) : int | ||
agentNo | int | The number of the agent whose maximum neighbor * count is to be retrieved. |
리턴 | int |
public getAgentMaxSpeed ( int agentNo ) : float | ||
agentNo | int | The number of the agent whose maximum speed is * to be retrieved. |
리턴 | float |
public getAgentNeighborDist ( int agentNo ) : float | ||
agentNo | int | The number of the agent whose maximum neighbor * distance is to be retrieved. |
리턴 | float |
public getAgentNumAgentNeighbors ( int agentNo ) : int | ||
agentNo | int | The number of the agent whose count of agent * neighbors is to be retrieved. |
리턴 | int |
public getAgentNumObstacleNeighbors ( int agentNo ) : int | ||
agentNo | int | The number of the agent whose count of obstacle * neighbors is to be retrieved. |
리턴 | int |
public getAgentObstacleNeighbor ( int agentNo, int neighborNo ) : int | ||
agentNo | int | The number of the agent whose obstacle neighbor * is to be retrieved. |
neighborNo | int | The number of the obstacle neighbor to be * retrieved. |
리턴 | int |
public getAgentOrcaLines ( int agentNo ) : IList |
||
agentNo | int | The number of the agent whose ORCA constraints * are to be retrieved. |
리턴 | IList |
public getAgentPosition ( int agentNo ) : Vector2 | ||
agentNo | int | The number of the agent whose two-dimensional * position is to be retrieved. |
리턴 | Vector2 |
public getAgentPrefVelocity ( int agentNo ) : Vector2 | ||
agentNo | int | The number of the agent whose two-dimensional * preferred velocity is to be retrieved. |
리턴 | Vector2 |
public getAgentRadius ( int agentNo ) : float | ||
agentNo | int | The number of the agent whose radius is to be * retrieved. |
리턴 | float |
public getAgentTimeHorizon ( int agentNo ) : float | ||
agentNo | int | The number of the agent whose time horizon is * to be retrieved. |
리턴 | float |
public getAgentTimeHorizonObst ( int agentNo ) : float | ||
agentNo | int | The number of the agent whose time horizon with * respect to obstacles is to be retrieved. |
리턴 | float |
public getAgentVelocity ( int agentNo ) : Vector2 | ||
agentNo | int | The number of the agent whose two-dimensional * linear velocity is to be retrieved. |
리턴 | Vector2 |
public getNextObstacleVertexNo ( int vertexNo ) : int | ||
vertexNo | int | The number of the obstacle vertex whose * successor is to be retrieved. |
리턴 | int |
public getObstacleVertex ( int vertexNo ) : Vector2 | ||
vertexNo | int | The number of the obstacle vertex to be * retrieved. |
리턴 | Vector2 |
public getPrevObstacleVertexNo ( int vertexNo ) : int | ||
vertexNo | int | The number of the obstacle vertex whose * predecessor is to be retrieved. |
리턴 | int |
public queryVisibility ( Vector2 point1, Vector2 point2, float radius ) : bool | ||
point1 | Vector2 | The first point of the query. |
point2 | Vector2 | The second point of the query. |
radius | float | The minimal distance between the line connecting * the two points and the obstacles in order for the points to be * mutually visible (optional). Must be non-negative. |
리턴 | bool |
public setAgentDefaults ( float neighborDist, int maxNeighbors, float timeHorizon, float timeHorizonObst, float radius, float maxSpeed, Vector2 velocity ) : void | ||
neighborDist | float | The default maximum distance (center point * to center point) to other agents a new agent takes into account in * the navigation. The larger this number, the longer he running time of * the simulation. If the number is too low, the simulation will not be * safe. Must be non-negative. |
maxNeighbors | int | The default maximum number of other agents * a new agent takes into account in the navigation. The larger this * number, the longer the running time of the simulation. If the number * is too low, the simulation will not be safe. |
timeHorizon | float | The default minimal amount of time for * which a new agent's velocities that are computed by the simulation * are safe with respect to other agents. The larger this number, the * sooner an agent will respond to the presence of other agents, but the * less freedom the agent has in choosing its velocities. Must be * positive. |
timeHorizonObst | float | The default minimal amount of time for * which a new agent's velocities that are computed by the simulation * are safe with respect to obstacles. The larger this number, the * sooner an agent will respond to the presence of obstacles, but the * less freedom the agent has in choosing its velocities. Must be * positive. |
radius | float | The default radius of a new agent. Must be * non-negative. |
maxSpeed | float | The default maximum speed of a new agent. Must * be non-negative. |
velocity | Vector2 | The default initial two-dimensional linear * velocity of a new agent. |
리턴 | void |
public setAgentMaxNeighbors ( int agentNo, int maxNeighbors ) : void | ||
agentNo | int | The number of the agent whose maximum neighbor * count is to be modified. |
maxNeighbors | int | The replacement maximum neighbor count. * |
리턴 | void |
public setAgentMaxSpeed ( int agentNo, float maxSpeed ) : void | ||
agentNo | int | The number of the agent whose maximum speed is * to be modified. |
maxSpeed | float | The replacement maximum speed. Must be * non-negative. |
리턴 | void |
public setAgentNeighborDist ( int agentNo, float neighborDist ) : void | ||
agentNo | int | The number of the agent whose maximum neighbor * distance is to be modified. |
neighborDist | float | The replacement maximum neighbor distance. * Must be non-negative. |
리턴 | void |
public setAgentPosition ( int agentNo, Vector2 position ) : void | ||
agentNo | int | The number of the agent whose two-dimensional * position is to be modified. |
position | Vector2 | The replacement of the two-dimensional * position. |
리턴 | void |
public setAgentPrefVelocity ( int agentNo, Vector2 prefVelocity ) : void | ||
agentNo | int | The number of the agent whose two-dimensional * preferred velocity is to be modified. |
prefVelocity | Vector2 | The replacement of the two-dimensional * preferred velocity. |
리턴 | void |
public setAgentRadius ( int agentNo, float radius ) : void | ||
agentNo | int | The number of the agent whose radius is to be * modified. |
radius | float | The replacement radius. Must be non-negative. * |
리턴 | void |
public setAgentTimeHorizon ( int agentNo, float timeHorizon ) : void | ||
agentNo | int | The number of the agent whose time horizon is * to be modified. |
timeHorizon | float | The replacement time horizon with respect * to other agents. Must be positive. |
리턴 | void |
public setAgentTimeHorizonObst ( int agentNo, float timeHorizonObst ) : void | ||
agentNo | int | The number of the agent whose time horizon with * respect to obstacles is to be modified. |
timeHorizonObst | float | The replacement time horizon with * respect to obstacles. Must be positive. |
리턴 | void |
public setAgentVelocity ( int agentNo, Vector2 velocity ) : void | ||
agentNo | int | The number of the agent whose two-dimensional * linear velocity is to be modified. |
velocity | Vector2 | The replacement two-dimensional linear * velocity. |
리턴 | void |
public setGlobalTime ( float globalTime ) : void | ||
globalTime | float | The global time of the simulation. |
리턴 | void |
public setTimeStep ( float timeStep ) : void | ||
timeStep | float | The time step of the simulation. Must be * positive. |
리턴 | void |