public class CohesionBehaviour extends AbstractStrengthSteeringBehaviour
| Modifier and Type | Class and Description |
|---|---|
static class |
CohesionBehaviour.negativeMaxDistance |
AbstractStrengthSteeringBehaviour.negativeScalarMultiplierAbstractSteeringBehaviour.IllegalBrakingFactorBehaviour.behaviourNullAgentExceptionvelocity| Constructor and Description |
|---|
CohesionBehaviour(Agent agent,
java.util.List<Agent> neighbours)
maxAngle is setted to PI / 2 by default and maxDistance to infinite.
|
CohesionBehaviour(Agent agent,
java.util.List<Agent> neighbours,
float maxDistance,
float maxAngle) |
CohesionBehaviour(Agent agent,
java.util.List<Agent> neighbours,
float maxDistance,
float maxAngle,
com.jme3.scene.Spatial spatial) |
CohesionBehaviour(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, turnOffStrengthControlagentTotalMass, calculateNewVelocity, controlUpdate, getBrakingFactor, getTPF, getVelocity, rotateAgent, setBrakingFactor, setTPF, setVelocitypublic CohesionBehaviour(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 CohesionBehaviour(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 neighbourhoodCohesionBehaviour.negativeMaxDistance - If maxDistance is lower than 0Agent#inBoidNeighborhoodMaxAngle(com.jme3.ai.agents.Agent, float, float, float),
CohesionBehaviour(com.jme3.ai.agents.Agent, java.util.List)public CohesionBehaviour(Agent agent, java.util.List<Agent> neighbours, com.jme3.scene.Spatial spatial)
spatial - active spatial during excecution of behaviourCohesionBehaviour(com.jme3.ai.agents.Agent, java.util.List)public void setNeighbours(java.util.List<Agent> neighbours)
protected com.jme3.math.Vector3f calculateFullSteering()
AbstractStrengthSteeringBehaviourcalculateFullSteering in class AbstractStrengthSteeringBehaviourAbstractSteeringBehaviour.calculateSteering()protected void controlRender(com.jme3.renderer.RenderManager rm,
com.jme3.renderer.ViewPort vp)
controlRender in class com.jme3.scene.control.AbstractControl