com.jme3.bullet.objects
クラス VehicleWheel

java.lang.Object
  上位を拡張 com.jme3.bullet.objects.VehicleWheel
すべての実装されたインタフェース:
Savable

public class VehicleWheel
extends java.lang.Object
implements Savable

Stores info about one wheel of a PhysicsVehicle


コンストラクタの概要
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)
           
 
メソッドの概要
 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)
 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.)
 float getSuspensionStiffness()
           
 com.bulletphysics.dynamics.vehicle.WheelInfo getWheelInfo()
           
 float getWheelsDampingCompression()
           
 float getWheelsDampingRelaxation()
           
 Spatial getWheelSpatial()
           
 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 vehcile.
 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. 10.0 - Offroad buggy, 50.0 - Sports car, 200.0 - F1 Car
 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)
           
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

VehicleWheel

public VehicleWheel()

VehicleWheel

public VehicleWheel(Spatial spat,
                    Vector3f location,
                    Vector3f direction,
                    Vector3f axle,
                    float restLength,
                    float radius,
                    boolean frontWheel)

VehicleWheel

public VehicleWheel(Vector3f location,
                    Vector3f direction,
                    Vector3f axle,
                    float restLength,
                    float radius,
                    boolean frontWheel)
メソッドの詳細

updatePhysicsState

public void updatePhysicsState()

applyWheelTransform

public void applyWheelTransform()

getWheelInfo

public com.bulletphysics.dynamics.vehicle.WheelInfo getWheelInfo()

setWheelInfo

public void setWheelInfo(com.bulletphysics.dynamics.vehicle.WheelInfo wheelInfo)

isFrontWheel

public boolean isFrontWheel()

setFrontWheel

public void setFrontWheel(boolean frontWheel)

getLocation

public Vector3f getLocation()

getDirection

public Vector3f getDirection()

getAxle

public Vector3f getAxle()

getSuspensionStiffness

public float getSuspensionStiffness()

setSuspensionStiffness

public void setSuspensionStiffness(float suspensionStiffness)
the stiffness constant for the suspension. 10.0 - Offroad buggy, 50.0 - Sports car, 200.0 - F1 Car

パラメータ:
suspensionStiffness -

getWheelsDampingRelaxation

public float getWheelsDampingRelaxation()

setWheelsDampingRelaxation

public void setWheelsDampingRelaxation(float wheelsDampingRelaxation)
the damping coefficient for when the suspension is expanding. See the comments for setWheelsDampingCompression for how to set k.

パラメータ:
wheelsDampingRelaxation -

getWheelsDampingCompression

public float getWheelsDampingCompression()

setWheelsDampingCompression

public void setWheelsDampingCompression(float wheelsDampingCompression)
the damping coefficient for when the suspension is compressed. Set to k * 2.0 * FastMath.sqrt(m_suspensionStiffness) so k is proportional to critical damping.
k = 0.0 undamped & bouncy, k = 1.0 critical damping
0.1 to 0.3 are good values

パラメータ:
wheelsDampingCompression -

getFrictionSlip

public float getFrictionSlip()

setFrictionSlip

public void setFrictionSlip(float frictionSlip)
the coefficient of friction between the tyre and the ground. Should be about 0.8 for realistic cars, but can increased for better handling. Set large (10000.0) for kart racers

パラメータ:
frictionSlip -

getRollInfluence

public float getRollInfluence()

setRollInfluence

public void setRollInfluence(float rollInfluence)
reduces the rolling torque applied from the wheels that cause the vehicle to roll over. This is a bit of a hack, but it's quite effective. 0.0 = no roll, 1.0 = physical behaviour. If m_frictionSlip is too high, you'll need to reduce this to stop the vehicle rolling over. You should also try lowering the vehicle's centre of mass

パラメータ:
rollInfluence - the rollInfluence to set

getMaxSuspensionTravelCm

public float getMaxSuspensionTravelCm()

setMaxSuspensionTravelCm

public void setMaxSuspensionTravelCm(float maxSuspensionTravelCm)
the maximum distance the suspension can be compressed (centimetres)

パラメータ:
maxSuspensionTravelCm -

getMaxSuspensionForce

public float getMaxSuspensionForce()

setMaxSuspensionForce

public void setMaxSuspensionForce(float maxSuspensionForce)
The maximum suspension force, raise this above the default 6000 if your suspension cannot handle the weight of your vehcile.

パラメータ:
maxSuspensionTravelCm -

getRadius

public float getRadius()

setRadius

public void setRadius(float radius)

getRestLength

public float getRestLength()

setRestLength

public void setRestLength(float restLength)

getGroundObject

public PhysicsCollisionObject getGroundObject()
returns the object this wheel is in contact with or null if no contact

戻り値:
the PhysicsCollisionObject (PhysicsRigidBody, PhysicsGhostObject)

getCollisionLocation

public Vector3f getCollisionLocation(Vector3f vec)
returns the location where the wheel collides with the ground (world space)


getCollisionLocation

public Vector3f getCollisionLocation()
returns the location where the wheel collides with the ground (world space)


getCollisionNormal

public Vector3f getCollisionNormal(Vector3f vec)
returns the normal where the wheel collides with the ground (world space)


getCollisionNormal

public Vector3f getCollisionNormal()
returns the normal where the wheel collides with the ground (world space)


getSkidInfo

public 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.


read

public void read(JmeImporter im)
          throws java.io.IOException
定義:
インタフェース Savable 内の read
例外:
java.io.IOException

write

public void write(JmeExporter ex)
           throws java.io.IOException
定義:
インタフェース Savable 内の write
例外:
java.io.IOException

getWheelSpatial

public Spatial getWheelSpatial()
戻り値:
the wheelSpatial

setWheelSpatial

public void setWheelSpatial(Spatial wheelSpatial)
パラメータ:
wheelSpatial - the wheelSpatial to set

isApplyLocal

public boolean isApplyLocal()

setApplyLocal

public void setApplyLocal(boolean applyLocal)