public class AlignmentBehaviour extends AbstractStrengthSteeringBehaviour
Modifier and Type | Class and Description |
---|---|
static class |
AlignmentBehaviour.negativeMaxDistance |
AbstractStrengthSteeringBehaviour.negativeScalarMultiplier
AbstractSteeringBehaviour.IllegalBrakingFactor
Behaviour.behaviourNullAgentException
velocity
Constructor and Description |
---|
AlignmentBehaviour(Agent agent,
java.util.List<Agent> neighbours)
maxAngle is setted to PI / 2 by default and maxDistance to infinite.
|
AlignmentBehaviour(Agent agent,
java.util.List<Agent> neighbours,
float maxDistance,
float maxAngle) |
AlignmentBehaviour(Agent agent,
java.util.List<Agent> neighbours,
float maxDistance,
float maxAngle,
com.jme3.scene.Spatial spatial) |
AlignmentBehaviour(Agent agent,
java.util.List<Agent> neighbours,
com.jme3.scene.Spatial spatial) |
Modifier and Type | Method and Description |
---|---|
protected com.jme3.math.Vector3f |
calculateFullSteering()
If a bheaviour class extend from CompoundSteeringBehaviour instead
of AbstractSteeringBehaviout, It must implement this method instead of
calculateSteering().
|
protected void |
controlRender(com.jme3.renderer.RenderManager rm,
com.jme3.renderer.ViewPort vp) |
void |
setNeighbours(java.util.List<Agent> neighbours) |
calculateSteering, setupStrengthControl, setupStrengthControl, setupStrengthControl, setupStrengthControl, turnOffStrengthControl
agentTotalMass, calculateNewVelocity, controlUpdate, getBrakingFactor, getTPF, getVelocity, rotateAgent, setBrakingFactor, setTPF, setVelocity
public AlignmentBehaviour(Agent agent, java.util.List<Agent> neighbours)
agent
- To whom behaviour belongs.neighbours
- Neighbours, this agent is moving toward the center of this neighbours.public AlignmentBehaviour(Agent agent, java.util.List<Agent> neighbours, float maxDistance, float maxAngle)
maxDistance
- In order to consider a neihbour inside the neighbourhoodmaxAngle
- In order to consider a neihbour inside the neighbourhoodAlignmentBehaviour.negativeMaxDistance
- If maxDistance is lower than 0Agent#inBoidNeighborhoodMaxAngle(com.jme3.ai.agents.Agent, float, float, float)
,
AlignmentBehaviour(com.jme3.ai.agents.Agent, java.util.List)
public AlignmentBehaviour(Agent agent, java.util.List<Agent> neighbours, com.jme3.scene.Spatial spatial)
spatial
- active spatial during excecution of behaviourAlignmentBehaviour(com.jme3.ai.agents.Agent, java.util.List)
public void setNeighbours(java.util.List<Agent> neighbours)
protected com.jme3.math.Vector3f calculateFullSteering()
AbstractStrengthSteeringBehaviour
calculateFullSteering
in class AbstractStrengthSteeringBehaviour
AbstractSteeringBehaviour.calculateSteering()
protected void controlRender(com.jme3.renderer.RenderManager rm, com.jme3.renderer.ViewPort vp)
controlRender
in class com.jme3.scene.control.AbstractControl