public class SeparationBehaviour extends AbstractStrengthSteeringBehaviour
Modifier and Type | Class and Description |
---|---|
static class |
SeparationBehaviour.ObstacleAvoindanceWithNegativeMinDistance |
AbstractStrengthSteeringBehaviour.negativeScalarMultiplier
AbstractSteeringBehaviour.IllegalBrakingFactor
Behaviour.behaviourNullAgentException
velocity
Constructor and Description |
---|
SeparationBehaviour(Agent agent,
java.util.List<Agent> initialObstacles) |
SeparationBehaviour(Agent agent,
java.util.List<Agent> initialObstacles,
float minDistance) |
SeparationBehaviour(Agent agent,
java.util.List<Agent> initialObstacles,
float minDistance,
com.jme3.scene.Spatial spatial) |
SeparationBehaviour(Agent agent,
java.util.List<Agent> initialObstacles,
com.jme3.scene.Spatial spatial) |
Modifier and Type | Method and Description |
---|---|
protected com.jme3.math.Vector3f |
calculateFullSteering()
Original steering method by Brent Owens.
|
protected void |
controlRender(com.jme3.renderer.RenderManager rm,
com.jme3.renderer.ViewPort vp) |
void |
setMinDistance(float minDistance) |
void |
setObstacles(java.util.List<Agent> obstacles) |
calculateSteering, setupStrengthControl, setupStrengthControl, setupStrengthControl, setupStrengthControl, turnOffStrengthControl
agentTotalMass, calculateNewVelocity, controlUpdate, getBrakingFactor, getTPF, getVelocity, rotateAgent, setBrakingFactor, setTPF, setVelocity
public SeparationBehaviour(Agent agent, java.util.List<Agent> initialObstacles)
agent
- To whom behaviour belongs.initialObstacles
- Initializes a list with the obstacles from
the agent want to be separatedpublic SeparationBehaviour(Agent agent, java.util.List<Agent> initialObstacles, com.jme3.scene.Spatial spatial)
spatial
- active spatial during excecution of behaviourSeparationBehaviour(com.jme3.ai.agents.Agent, java.util.List)
public SeparationBehaviour(Agent agent, java.util.List<Agent> initialObstacles, float minDistance)
minDistance
- Min. distance from center to center to consider an obstacleSeparationBehaviour(com.jme3.ai.agents.Agent, java.util.List)
public SeparationBehaviour(Agent agent, java.util.List<Agent> initialObstacles, float minDistance, com.jme3.scene.Spatial spatial)
spatial
- active spatial during excecution of behaviourSeparationBehaviour(com.jme3.ai.agents.Agent, java.util.List, float)
public void setMinDistance(float minDistance)
public void setObstacles(java.util.List<Agent> obstacles)
protected void controlRender(com.jme3.renderer.RenderManager rm, com.jme3.renderer.ViewPort vp)
controlRender
in class com.jme3.scene.control.AbstractControl
protected com.jme3.math.Vector3f calculateFullSteering()
calculateFullSteering
in class AbstractStrengthSteeringBehaviour
AbstractSteeringBehaviour.calculateSteering()