jme.physics
Interface PhysicsModule

All Known Implementing Classes:
LandMobility

public interface PhysicsModule

PhysicsModule is an interface that defines the method for moving an entity through the environment. Implementation will define how the position and angle of the entity is affected per round. Calling update will set the physics attributes of the entity, such as the newest angle and velocity. Where updatePosition will set the new position of the entity.

Author:
Mark Powell

Method Summary
 float getCurrentAngle()
          getCurrentAngle returns the current angle of the entity as defined by the physics module.
 float getCurrentTurningVel()
          getCurrentTurningVel returns the current turning velocity of the entity as defined by the physics module.
 float getCurrentVelocity()
          getCurrentVelocity returns the current velocity of the entity as defined by the physics module.
 void move(float moveScalar)
          move moves the entity in the way defined by the implementation of PhysicsModule.
 void strafe(float strafeScalar)
          strafe strafes the entity in the way defined by the implementation of PhysicsModule.
 void turn(float turnScalar)
          turn turns the entity in the way defined by the implementation of PhysicsModule.
 void update(float time)
          update should update any physical attributes of the entity.
 void updatePosition(Vector position)
          updatePosition sets the position (supplied as a parameter) to the new position defined by the module's attributes.
 

Method Detail

update

public void update(float time)
update should update any physical attributes of the entity.

Parameters:
time - the time between updates.

updatePosition

public void updatePosition(Vector position)
updatePosition sets the position (supplied as a parameter) to the new position defined by the module's attributes.

Parameters:
position - the position to set.

turn

public void turn(float turnScalar)
turn turns the entity in the way defined by the implementation of PhysicsModule.

Parameters:
turnScalar - any scalar to the turning properties of the entity.

move

public void move(float moveScalar)
move moves the entity in the way defined by the implementation of PhysicsModule.

Parameters:
moveScalar - any scalar to the movement properties of the entity.

strafe

public void strafe(float strafeScalar)
strafe strafes the entity in the way defined by the implementation of PhysicsModule.

Parameters:
strafeScalar - any scalar to the strafe properties of the entity.

getCurrentAngle

public float getCurrentAngle()
getCurrentAngle returns the current angle of the entity as defined by the physics module.

Returns:
the current angle of the entity.

getCurrentVelocity

public float getCurrentVelocity()
getCurrentVelocity returns the current velocity of the entity as defined by the physics module.

Returns:
the current velocity of the entity.

getCurrentTurningVel

public float getCurrentTurningVel()
getCurrentTurningVel returns the current turning velocity of the entity as defined by the physics module.

Returns:
the current turning velocity of the entity.