public class CompoundSteeringBehaviour extends AbstractStrengthSteeringBehaviour
| Modifier and Type | Class and Description |
|---|---|
protected class |
CompoundSteeringBehaviour.steerBehavioursLayerList
Ordered list.
|
AbstractStrengthSteeringBehaviour.negativeScalarMultiplierAbstractSteeringBehaviour.IllegalBrakingFactorBehaviour.behaviourNullAgentException| Modifier and Type | Field and Description |
|---|---|
protected CompoundSteeringBehaviour.steerBehavioursLayerList |
behaviours
Partial behaviours
|
velocity| Constructor and Description |
|---|
CompoundSteeringBehaviour(Agent agent) |
CompoundSteeringBehaviour(Agent agent,
com.jme3.scene.Spatial spatial) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSteerBehaviour(AbstractSteeringBehaviour behaviour)
Adds a behaviour to the compound behaviour.
|
void |
addSteerBehaviour(AbstractSteeringBehaviour behaviour,
int priority,
float minLengthToInvalidSteer)
To optimize the process speed add the behaviours with the lowest priority first.
|
protected com.jme3.math.Vector3f |
calculateFullSteering()
Calculates the composed steering force.
|
protected com.jme3.math.Vector3f |
calculatePartialForce(AbstractSteeringBehaviour behaviour)
Calculates the steering force of a single behaviour
|
protected void |
controlRender(com.jme3.renderer.RenderManager rm,
com.jme3.renderer.ViewPort vp) |
protected void |
controlUpdate(float tpf)
Usual update pattern for steering behaviours.
|
void |
removeSteerBehaviour(AbstractSteeringBehaviour behaviour)
Removes a behaviour from the compound steer behaviour.
|
calculateSteering, setupStrengthControl, setupStrengthControl, setupStrengthControl, setupStrengthControl, turnOffStrengthControlagentTotalMass, calculateNewVelocity, getBrakingFactor, getTPF, getVelocity, rotateAgent, setBrakingFactor, setTPF, setVelocityprotected CompoundSteeringBehaviour.steerBehavioursLayerList behaviours
public CompoundSteeringBehaviour(Agent agent)
public CompoundSteeringBehaviour(Agent agent, com.jme3.scene.Spatial spatial)
public void addSteerBehaviour(AbstractSteeringBehaviour behaviour)
behaviour - Behaviour that you want to addpublic void removeSteerBehaviour(AbstractSteeringBehaviour behaviour)
behaviour - Behaviour that you want to removepublic void addSteerBehaviour(AbstractSteeringBehaviour behaviour, int priority, float minLengthToInvalidSteer)
priority - This behaviour will be processed If all higher priority behaviours can be considered inactivesminLengthToInvalidSteer - If the behaviour steer force length is less than this value It will be considered inactiveaddSteerBehaviour(com.jme3.ai.agents.behaviours.npc.steering.AbstractSteeringBehaviour)protected com.jme3.math.Vector3f calculateFullSteering()
calculateFullSteering in class AbstractStrengthSteeringBehaviourAbstractSteeringBehaviour.calculateSteering()protected com.jme3.math.Vector3f calculatePartialForce(AbstractSteeringBehaviour behaviour)
behaviour - The behaviour.protected void controlRender(com.jme3.renderer.RenderManager rm,
com.jme3.renderer.ViewPort vp)
controlRender in class com.jme3.scene.control.AbstractControlprotected void controlUpdate(float tpf)
controlUpdate in class AbstractSteeringBehaviourtpf -