public class CompoundSteeringBehavior extends AbstractStrengthSteeringBehavior
| Modifier and Type | Class and Description |
|---|---|
protected class |
CompoundSteeringBehavior.steerBehaviorsLayerList
Ordered list.
|
| Modifier and Type | Field and Description |
|---|---|
protected CompoundSteeringBehavior.steerBehaviorsLayerList |
behaviors
Partial behaviors
|
timePerFrame, velocity| Constructor and Description |
|---|
CompoundSteeringBehavior(Agent agent) |
CompoundSteeringBehavior(Agent agent,
com.jme3.scene.Spatial spatial) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSteerBehavior(AbstractSteeringBehavior behavior)
Adds a behavior to the compound behavior.
|
void |
addSteerBehavior(AbstractSteeringBehavior behavior,
int priority,
float minLengthToInvalidSteer)
To optimize the process speed add the behaviors with the lowest priority
first.
|
protected com.jme3.math.Vector3f |
calculatePartialForce(AbstractSteeringBehavior behavior)
Calculates the steering force of a single behavior
|
protected com.jme3.math.Vector3f |
calculateRawSteering()
Calculates the composed steering force.
|
protected void |
controlUpdate(float tpf)
Usual update pattern for steering behaviors.
|
void |
removeSteerBehavior(AbstractSteeringBehavior behavior)
Removes a behavior from the compound steer behavior.
|
calculateSteering, setupStrengthControl, setupStrengthControl, setupStrengthControl, setupStrengthControl, setupStrengthControl, turnOffStrengthControlagentTotalMass, calculateNewVelocity, convertToGameEntities, getBrakingFactor, getTimePerFrame, getVelocity, rotateAgent, setBrakingFactor, setTimePerFrame, setVelocitycontrolRenderprotected CompoundSteeringBehavior.steerBehaviorsLayerList behaviors
public CompoundSteeringBehavior(Agent agent)
public CompoundSteeringBehavior(Agent agent, com.jme3.scene.Spatial spatial)
public void addSteerBehavior(AbstractSteeringBehavior behavior)
behavior - Behavior that you want to addpublic void removeSteerBehavior(AbstractSteeringBehavior behavior)
behavior - Behavior that you want to removepublic void addSteerBehavior(AbstractSteeringBehavior behavior, int priority, float minLengthToInvalidSteer)
priority - This behavior will be processed If all higher priority
behaviors can be considered inactivesminLengthToInvalidSteer - If the behavior steer force length is
less than this value It will be considered inactiveaddSteerBehavior(com.jme3.ai.agents.behaviors.npc.steering.AbstractSteeringBehavior)protected com.jme3.math.Vector3f calculateRawSteering()
calculateRawSteering in class AbstractStrengthSteeringBehaviorAbstractSteeringBehavior.calculateSteering()protected com.jme3.math.Vector3f calculatePartialForce(AbstractSteeringBehavior behavior)
behavior - The behavior.protected void controlUpdate(float tpf)
controlUpdate in class AbstractSteeringBehaviortpf -