Modifier and Type | Field and Description |
---|---|
protected Vector3f |
axle |
protected Vector3f |
direction |
protected float |
frictionSlip |
protected boolean |
frontWheel |
protected Vector3f |
location |
protected float |
maxSuspensionForce |
protected float |
maxSuspensionTravelCm |
protected float |
radius |
protected float |
restLength |
protected float |
rollInfluence |
protected float |
suspensionStiffness |
protected Quaternion |
tmp_inverseWorldRotation |
protected Matrix3f |
tmp_Matrix |
protected com.bulletphysics.dynamics.vehicle.WheelInfo |
wheelInfo |
protected float |
wheelsDampingCompression |
protected float |
wheelsDampingRelaxation |
protected Spatial |
wheelSpatial |
protected Vector3f |
wheelWorldLocation |
protected Quaternion |
wheelWorldRotation |
Modifier | Constructor and Description |
---|---|
protected |
VehicleWheel() |
|
VehicleWheel(Spatial spat,
Vector3f location,
Vector3f direction,
Vector3f axle,
float restLength,
float radius,
boolean frontWheel) |
|
VehicleWheel(Vector3f location,
Vector3f direction,
Vector3f axle,
float restLength,
float radius,
boolean frontWheel) |
Modifier and Type | Method and Description |
---|---|
void |
applyWheelTransform() |
Vector3f |
getAxle() |
Vector3f |
getCollisionLocation()
returns the location where the wheel collides with the ground (world space)
|
Vector3f |
getCollisionLocation(Vector3f vec)
returns the location where the wheel collides with the ground (world space)
|
Vector3f |
getCollisionNormal()
returns the normal where the wheel collides with the ground (world space)
|
Vector3f |
getCollisionNormal(Vector3f vec)
returns the normal where the wheel collides with the ground (world space)
|
float |
getDeltaRotation()
returns how many degrees the wheel has turned since the last physics
step.
|
Vector3f |
getDirection() |
float |
getFrictionSlip() |
PhysicsCollisionObject |
getGroundObject()
returns the object this wheel is in contact with or null if no contact
|
Vector3f |
getLocation() |
float |
getMaxSuspensionForce() |
float |
getMaxSuspensionTravelCm() |
float |
getRadius() |
float |
getRestLength() |
float |
getRollInfluence() |
float |
getSkidInfo()
returns how much the wheel skids on the ground (for skid sounds/smoke etc.)
0.0 = wheels are sliding, 1.0 = wheels have traction. |
float |
getSuspensionStiffness() |
com.bulletphysics.dynamics.vehicle.WheelInfo |
getWheelInfo() |
float |
getWheelsDampingCompression() |
float |
getWheelsDampingRelaxation() |
Spatial |
getWheelSpatial() |
void |
getWheelWorldLocation(Vector3f store)
write the content of the wheelWorldLocation into the store
|
void |
getWheelWorldRotation(Quaternion store)
write the content of the wheelWorldRotation into the store
|
boolean |
isApplyLocal() |
boolean |
isFrontWheel() |
void |
read(JmeImporter im) |
void |
setApplyLocal(boolean applyLocal) |
void |
setFrictionSlip(float frictionSlip)
the coefficient of friction between the tyre and the ground.
|
void |
setFrontWheel(boolean frontWheel) |
void |
setMaxSuspensionForce(float maxSuspensionForce)
The maximum suspension force, raise this above the default 6000 if your suspension cannot
handle the weight of your vehicle.
|
void |
setMaxSuspensionTravelCm(float maxSuspensionTravelCm)
the maximum distance the suspension can be compressed (centimetres)
|
void |
setRadius(float radius) |
void |
setRestLength(float restLength) |
void |
setRollInfluence(float rollInfluence)
reduces the rolling torque applied from the wheels that cause the vehicle to roll over.
|
void |
setSuspensionStiffness(float suspensionStiffness)
the stiffness constant for the suspension.
|
void |
setWheelInfo(com.bulletphysics.dynamics.vehicle.WheelInfo wheelInfo) |
void |
setWheelsDampingCompression(float wheelsDampingCompression)
the damping coefficient for when the suspension is compressed.
|
void |
setWheelsDampingRelaxation(float wheelsDampingRelaxation)
the damping coefficient for when the suspension is expanding.
|
void |
setWheelSpatial(Spatial wheelSpatial) |
void |
updatePhysicsState() |
void |
write(JmeExporter ex) |
protected com.bulletphysics.dynamics.vehicle.WheelInfo wheelInfo
protected boolean frontWheel
protected Vector3f location
protected Vector3f direction
protected Vector3f axle
protected float suspensionStiffness
protected float wheelsDampingRelaxation
protected float wheelsDampingCompression
protected float frictionSlip
protected float rollInfluence
protected float maxSuspensionTravelCm
protected float maxSuspensionForce
protected float radius
protected float restLength
protected Vector3f wheelWorldLocation
protected Quaternion wheelWorldRotation
protected Spatial wheelSpatial
protected Matrix3f tmp_Matrix
protected final Quaternion tmp_inverseWorldRotation
protected VehicleWheel()
public VehicleWheel(Spatial spat, Vector3f location, Vector3f direction, Vector3f axle, float restLength, float radius, boolean frontWheel)
public void updatePhysicsState()
public void applyWheelTransform()
public com.bulletphysics.dynamics.vehicle.WheelInfo getWheelInfo()
public void setWheelInfo(com.bulletphysics.dynamics.vehicle.WheelInfo wheelInfo)
public boolean isFrontWheel()
public void setFrontWheel(boolean frontWheel)
public Vector3f getLocation()
public Vector3f getDirection()
public Vector3f getAxle()
public float getSuspensionStiffness()
public void setSuspensionStiffness(float suspensionStiffness)
suspensionStiffness
- public float getWheelsDampingRelaxation()
public void setWheelsDampingRelaxation(float wheelsDampingRelaxation)
wheelsDampingRelaxation
- public float getWheelsDampingCompression()
public void setWheelsDampingCompression(float wheelsDampingCompression)
wheelsDampingCompression
- public float getFrictionSlip()
public void setFrictionSlip(float frictionSlip)
frictionSlip
- public float getRollInfluence()
public void setRollInfluence(float rollInfluence)
rollInfluence
- the rollInfluence to setpublic float getMaxSuspensionTravelCm()
public void setMaxSuspensionTravelCm(float maxSuspensionTravelCm)
maxSuspensionTravelCm
- public float getMaxSuspensionForce()
public void setMaxSuspensionForce(float maxSuspensionForce)
maxSuspensionForce
- public float getRadius()
public void setRadius(float radius)
public float getRestLength()
public void setRestLength(float restLength)
public PhysicsCollisionObject getGroundObject()
public Vector3f getCollisionLocation(Vector3f vec)
public Vector3f getCollisionLocation()
public Vector3f getCollisionNormal(Vector3f vec)
public Vector3f getCollisionNormal()
public float getSkidInfo()
public float getDeltaRotation()
public void read(JmeImporter im) throws java.io.IOException
public void write(JmeExporter ex) throws java.io.IOException
public Spatial getWheelSpatial()
public void setWheelSpatial(Spatial wheelSpatial)
wheelSpatial
- the wheelSpatial to setpublic boolean isApplyLocal()
public void setApplyLocal(boolean applyLocal)
public void getWheelWorldRotation(Quaternion store)
store
- public void getWheelWorldLocation(Vector3f store)
store
-