public class SeparationBehavior extends AbstractStrengthSteeringBehavior
timePerFrame, velocity
Constructor and Description |
---|
SeparationBehavior(Agent agent,
java.util.List<GameEntity> initialObstacles) |
SeparationBehavior(Agent agent,
java.util.List<GameEntity> initialObstacles,
float minDistance) |
SeparationBehavior(Agent agent,
java.util.List<GameEntity> initialObstacles,
float minDistance,
com.jme3.scene.Spatial spatial) |
SeparationBehavior(Agent agent,
java.util.List<GameEntity> initialObstacles,
com.jme3.scene.Spatial spatial) |
Modifier and Type | Method and Description |
---|---|
protected com.jme3.math.Vector3f |
calculateRawSteering()
If a behavior class extend from CompoundSteeringBehaviour instead of
AbstractSteeringBehavior, it must implement this method instead of
calculateSteering().
|
void |
setMinDistance(float minDistance) |
void |
setObstacles(java.util.List<GameEntity> obstacles) |
void |
setObstaclesFromTeam(Team team) |
calculateSteering, setupStrengthControl, setupStrengthControl, setupStrengthControl, setupStrengthControl, setupStrengthControl, turnOffStrengthControl
agentTotalMass, calculateNewVelocity, controlUpdate, convertToGameEntities, getBrakingFactor, getTimePerFrame, getVelocity, rotateAgent, setBrakingFactor, setTimePerFrame, setVelocity
controlRender
public SeparationBehavior(Agent agent, java.util.List<GameEntity> initialObstacles)
agent
- To whom behavior belongs.initialObstacles
- Initializes a list with the obstacles from the
agent want to be separatedpublic SeparationBehavior(Agent agent, java.util.List<GameEntity> initialObstacles, com.jme3.scene.Spatial spatial)
spatial
- active spatial during excecution of behaviorSeparationBehavior(com.jme3.ai.agents.Agent,
java.util.List)
public SeparationBehavior(Agent agent, java.util.List<GameEntity> initialObstacles, float minDistance)
minDistance
- Min. distance from center to center to consider an
obstacleSeparationBehavior(com.jme3.ai.agents.Agent,
java.util.List)
public SeparationBehavior(Agent agent, java.util.List<GameEntity> initialObstacles, float minDistance, com.jme3.scene.Spatial spatial)
spatial
- active spatial during excecution of behaviourSeparationBehavior(com.jme3.ai.agents.Agent,
java.util.List, float)
protected com.jme3.math.Vector3f calculateRawSteering()
AbstractStrengthSteeringBehavior
calculateRawSteering
in class AbstractStrengthSteeringBehavior
AbstractSteeringBehavior.calculateSteering()
public void setMinDistance(float minDistance)
public void setObstacles(java.util.List<GameEntity> obstacles)
public void setObstaclesFromTeam(Team team)