public class PointMass extends java.lang.Object implements IVehicle
Constructor and Description |
---|
PointMass(float mass,
float inertia,
float maxVelocity,
float maxForce,
Vector3 steering,
Vector3 up,
SceneNode node) |
Modifier and Type | Method and Description |
---|---|
void |
accelerate(float velocity) |
void |
addSteeringForce(Vector3 steering)
Add a new steering force
|
Vector3 |
getForward() |
Vector3 |
getInitForward() |
float |
getMass() |
float |
getMaxForce() |
float |
getMaxVelocity() |
Quaternion |
getOrientation() |
Vector3 |
getPosition() |
Vector3 |
getUp() |
Vector3 |
getVelocity() |
boolean |
isFinished() |
void |
onUpdate(float time) |
void |
resetSteeringForces()
Reset the accumulated steering forces
|
void |
setOrientation(Quaternion orientation) |
void |
translate(Vector3 position) |
public Vector3 getPosition()
getPosition
in interface IVehicle
public Vector3 getVelocity()
getVelocity
in interface IVehicle
public float getMaxVelocity()
getMaxVelocity
in interface IVehicle
public float getMaxForce()
getMaxForce
in interface IVehicle
public Quaternion getOrientation()
getOrientation
in interface IVehicle
public void accelerate(float velocity)
accelerate
in interface IVehicle
public void resetSteeringForces()
IVehicle
resetSteeringForces
in interface IVehicle
public void addSteeringForce(Vector3 steering)
IVehicle
addSteeringForce
in interface IVehicle
steering
- The new steering forcepublic void onUpdate(float time)
onUpdate
in interface IUpdateable
public boolean isFinished()
isFinished
in interface IUpdateable
public Vector3 getForward()
getForward
in interface IVehicle
public Vector3 getInitForward()
getInitForward
in interface IVehicle
public void setOrientation(Quaternion orientation)
setOrientation
in interface IVehicle