37 #ifndef RVO_RVO_SIMULATOR_H_ 38 #define RVO_RVO_SIMULATOR_H_ 57 const size_t
RVO_ERROR = std::numeric_limits<size_t>::max();
97 RVO_API
RVOSimulator(
float timeStep,
float neighborDist, size_t maxNeighbors,
float timeHorizon,
float radius,
float maxSpeed,
const Vector3 &velocity =
Vector3());
122 RVO_API size_t
addAgent(
const Vector3 &position,
float neighborDist, size_t maxNeighbors,
float timeHorizon,
float radius,
float maxSpeed,
const Vector3 &velocity =
Vector3());
250 RVO_API
void setAgentDefaults(
float neighborDist, size_t maxNeighbors,
float timeHorizon,
float radius,
float maxSpeed,
const Vector3 &velocity =
Vector3());
315 Agent *defaultAgent_;
319 std::vector<Agent *> agents_;
RVO_API void setAgentRadius(size_t agentNo, float radius)
Sets the radius of a specified agent.
RVO_API size_t getAgentAgentNeighbor(size_t agentNo, size_t neighborNo) const
Returns the specified agent neighbor of the specified agent.
RVO_API size_t getAgentNumAgentNeighbors(size_t agentNo) const
Returns the count of agent neighbors taken into account to compute the current velocity for the speci...
RVO_API void setAgentDefaults(float neighborDist, size_t maxNeighbors, float timeHorizon, float radius, float maxSpeed, const Vector3 &velocity=Vector3())
Sets the default properties for any new agent that is added.
RVO_API const Vector3 & getAgentVelocity(size_t agentNo) const
Returns the three-dimensional linear velocity of a specified agent.
RVO_API void setAgentMaxNeighbors(size_t agentNo, size_t maxNeighbors)
Sets the maximum neighbor count of a specified agent.
Defines a plane.
Definition: RVOSimulator.h:62
RVO_API void setAgentPosition(size_t agentNo, const Vector3 &position)
Sets the three-dimensional position of a specified agent.
RVO_API size_t getNumAgents() const
Returns the count of agents in the simulation.
RVO_API float getAgentTimeHorizon(size_t agentNo) const
Returns the time horizon of a specified agent.
Vector3 normal
The normal to the plane.
Definition: RVOSimulator.h:72
RVO_API float getAgentRadius(size_t agentNo) const
Returns the radius of a specified agent.
RVO_API size_t getAgentNumORCAPlanes(size_t agentNo) const
Returns the count of ORCA constraints used to compute the current velocity for the specified agent...
RVO_API void setAgentMaxSpeed(size_t agentNo, float maxSpeed)
Sets the maximum speed of a specified agent.
RVO_API size_t addAgent(const Vector3 &position, float neighborDist, size_t maxNeighbors, float timeHorizon, float radius, float maxSpeed, const Vector3 &velocity=Vector3())
Adds a new agent to the simulation.
const size_t RVO_ERROR
Error value.
Definition: RVOSimulator.h:57
RVO_API void doStep()
Lets the simulator perform a simulation step and updates the three-dimensional position and three-dim...
RVO_API size_t getAgentMaxNeighbors(size_t agentNo) const
Returns the maximum neighbor count of a specified agent.
RVO_API size_t addAgent(const Vector3 &position)
Adds a new agent with default properties to the simulation.
RVO_API RVOSimulator()
Constructs a simulator instance.
friend class KdTree
Definition: RVOSimulator.h:322
Vector3 point
A point on the plane.
Definition: RVOSimulator.h:67
RVO_API RVOSimulator(float timeStep, float neighborDist, size_t maxNeighbors, float timeHorizon, float radius, float maxSpeed, const Vector3 &velocity=Vector3())
Constructs a simulator instance and sets the default properties for any new agent that is added...
RVO_API Vector3()
Constructs and initializes a three-dimensional vector instance to zero.
Definition: Vector3.h:55
RVO_API ~RVOSimulator()
Destroys this simulator instance.
RVO_API void setAgentTimeHorizon(size_t agentNo, float timeHorizon)
Sets the time horizon of a specified agent with respect to other agents.
RVO_API const Plane & getAgentORCAPlane(size_t agentNo, size_t planeNo) const
Returns the specified ORCA constraint of the specified agent.
RVO_API void setTimeStep(float timeStep)
Sets the time step of the simulation.
RVO_API void setAgentPrefVelocity(size_t agentNo, const Vector3 &prefVelocity)
Sets the three-dimensional preferred velocity of a specified agent.
RVO_API const Vector3 & getAgentPrefVelocity(size_t agentNo) const
Returns the three-dimensional preferred velocity of a specified agent.
Defines the simulation.
Definition: RVOSimulator.h:80
RVO_API void removeAgent(size_t agentNo)
Removes an agent from the simulation.
RVO_API void setAgentVelocity(size_t agentNo, const Vector3 &velocity)
Sets the three-dimensional linear velocity of a specified agent.
RVO_API float getTimeStep() const
Returns the time step of the simulation.
RVO_API void setAgentNeighborDist(size_t agentNo, float neighborDist)
Sets the maximum neighbor distance of a specified agent.
RVO_API float getGlobalTime() const
Returns the global time of the simulation.
RVO_API float getAgentMaxSpeed(size_t agentNo) const
Returns the maximum speed of a specified agent.
RVO_API const Vector3 & getAgentPosition(size_t agentNo) const
Returns the three-dimensional position of a specified agent.
Defines a three-dimensional vector.
Definition: Vector3.h:50
RVO_API float getAgentNeighborDist(size_t agentNo) const
Returns the maximum neighbor distance of a specified agent.