com.jme3.bullet.control
Class VehicleControl
java.lang.Object
com.jme3.bullet.collision.PhysicsCollisionObject
com.jme3.bullet.objects.PhysicsRigidBody
com.jme3.bullet.objects.PhysicsVehicle
com.jme3.bullet.control.VehicleControl
- All Implemented Interfaces:
- PhysicsControl, Savable, Control
public class VehicleControl
- extends PhysicsVehicle
- implements PhysicsControl
Fields inherited from class com.jme3.bullet.collision.PhysicsCollisionObject |
COLLISION_GROUP_01, COLLISION_GROUP_02, COLLISION_GROUP_03, COLLISION_GROUP_04, COLLISION_GROUP_05, COLLISION_GROUP_06, COLLISION_GROUP_07, COLLISION_GROUP_08, COLLISION_GROUP_09, COLLISION_GROUP_10, COLLISION_GROUP_11, COLLISION_GROUP_12, COLLISION_GROUP_13, COLLISION_GROUP_14, COLLISION_GROUP_15, COLLISION_GROUP_16, COLLISION_GROUP_NONE, collisionGroup, collisionGroupsMask, collisionShape, debugArrow, debugArrowGeom, debugMaterialBlue, debugMaterialGreen, debugMaterialRed, debugMaterialYellow, debugShape, objectId |
Methods inherited from class com.jme3.bullet.objects.PhysicsVehicle |
accelerate, accelerate, addWheel, addWheel, applyWheelTransforms, brake, brake, createVehicle, finalize, getCurrentVehicleSpeedKmHour, getForwardVector, getFrictionSlip, getMaxSuspensionForce, getMaxSuspensionTravelCm, getNumWheels, getSuspensionCompression, getSuspensionDamping, getSuspensionStiffness, getVehicleId, getWheel, postRebuild, removeWheel, resetSuspension, setFrictionSlip, setFrictionSlip, setMaxSuspensionForce, setMaxSuspensionForce, setMaxSuspensionTravelCm, setMaxSuspensionTravelCm, setRollInfluence, setSuspensionCompression, setSuspensionCompression, setSuspensionDamping, setSuspensionDamping, setSuspensionStiffness, setSuspensionStiffness, steer, steer, updateWheels |
Methods inherited from class com.jme3.bullet.objects.PhysicsRigidBody |
activate, addJoint, applyCentralForce, applyForce, applyImpulse, applyTorque, applyTorqueImpulse, clearForces, getAngularDamping, getAngularFactor, getAngularSleepingThreshold, getAngularVelocity, getAngularVelocity, getCcdMotionThreshold, getCcdSquareMotionThreshold, getCcdSweptSphereRadius, getFriction, getGravity, getGravity, getJoints, getLinearDamping, getLinearSleepingThreshold, getLinearVelocity, getLinearVelocity, getMass, getMotionState, getPhysicsLocation, getPhysicsLocation, getPhysicsRotation, getPhysicsRotation, getPhysicsRotationMatrix, getPhysicsRotationMatrix, getRestitution, isActive, isInWorld, isKinematic, preRebuild, rebuildRigidBody, removeJoint, setAngularDamping, setAngularFactor, setAngularSleepingThreshold, setAngularVelocity, setCcdMotionThreshold, setCcdSweptSphereRadius, setCollisionShape, setDamping, setFriction, setGravity, setKinematic, setLinearDamping, setLinearSleepingThreshold, setLinearVelocity, setMass, setPhysicsLocation, setPhysicsRotation, setPhysicsRotation, setRestitution, setSleepingThresholds |
Methods inherited from class com.jme3.bullet.collision.PhysicsCollisionObject |
addCollideWithGroup, attachCollisionShape, attachDebugShape, attachDebugShape, attachDebugShape, createDebugShape, debugShape, detachDebugShape, finalizeNative, getCollideWithGroups, getCollisionGroup, getCollisionShape, getObjectId, getUserObject, initUserPointer, removeCollideWithGroup, setCollideWithGroups, setCollisionGroup, setUserObject, updateDebugShape |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
spatial
protected Spatial spatial
enabled
protected boolean enabled
space
protected PhysicsSpace space
added
protected boolean added
VehicleControl
public VehicleControl()
VehicleControl
public VehicleControl(CollisionShape shape)
- Creates a new PhysicsNode with the supplied collision shape
- Parameters:
shape
-
VehicleControl
public VehicleControl(CollisionShape shape,
float mass)
isApplyPhysicsLocal
public boolean isApplyPhysicsLocal()
setApplyPhysicsLocal
public void setApplyPhysicsLocal(boolean applyPhysicsLocal)
- When set to true, the physics coordinates will be applied to the local
translation of the Spatial
- Parameters:
applyPhysicsLocal
-
cloneForSpatial
public Control cloneForSpatial(Spatial spatial)
- Description copied from interface:
Control
- Creates a clone of the Control, the given Spatial is the cloned
version of the spatial to which this control is attached to.
- Specified by:
cloneForSpatial
in interface Control
- Returns:
- A clone of this control for the spatial
setSpatial
public void setSpatial(Spatial spatial)
- Specified by:
setSpatial
in interface Control
- Parameters:
spatial
- the spatial to be controlled. This should not be called
from user code.
setEnabled
public void setEnabled(boolean enabled)
- Description copied from interface:
PhysicsControl
- The physics object is removed from the physics space when the control
is disabled. When the control is enabled again the physics object is
moved to the current location of the spatial and then added to the physics
space. This allows disabling/enabling physics to move the spatial freely.
- Specified by:
setEnabled
in interface PhysicsControl
isEnabled
public boolean isEnabled()
update
public void update(float tpf)
- Description copied from interface:
Control
- Updates the control. This should not be called from user code.
- Specified by:
update
in interface Control
- Parameters:
tpf
- Time per frame.
getDebugShape
protected Spatial getDebugShape()
- Overrides:
getDebugShape
in class PhysicsVehicle
render
public void render(RenderManager rm,
ViewPort vp)
- Description copied from interface:
Control
- Should be called prior to queuing the spatial by the RenderManager. This
should not be called from user code.
- Specified by:
render
in interface Control
setPhysicsSpace
public void setPhysicsSpace(PhysicsSpace space)
- Specified by:
setPhysicsSpace
in interface PhysicsControl
getPhysicsSpace
public PhysicsSpace getPhysicsSpace()
- Specified by:
getPhysicsSpace
in interface PhysicsControl
write
public void write(JmeExporter ex)
throws java.io.IOException
- Specified by:
write
in interface Savable
- Overrides:
write
in class PhysicsVehicle
- Throws:
java.io.IOException
read
public void read(JmeImporter im)
throws java.io.IOException
- Specified by:
read
in interface Savable
- Overrides:
read
in class PhysicsVehicle
- Throws:
java.io.IOException