Package com.jme3.bullet.objects.infos
Class VehicleTuning
java.lang.Object
com.jme3.bullet.NativePhysicsObject
com.jme3.bullet.objects.infos.VehicleTuning
- All Implemented Interfaces:
- Comparable<NativePhysicsObject>
Tuning parameters for a PhysicsVehicle, based on Bullet's btVehicleTuning.
- 
Field SummaryFieldsFields inherited from class com.jme3.bullet.NativePhysicsObjectloggerN
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfloatReturn the friction between tires and ground (native field: m_frictionSlip).floatReturn the maximum force exerted by each wheel's suspension (native field: m_maxSuspensionForce).floatDetermine the maximum travel distance for each wheel's suspension (native field: m_maxSuspensionTravelCm).floatReturn the suspension damping when compressed (native field: m_suspensionCompression).floatReturn the suspension damping when expanded (native field: m_suspensionDamping).floatReturn the suspension stiffness (native field: m_suspensionStiffness).voidsetFrictionSlip(float coeff) Alter the friction between tires and ground (native field: m_frictionSlip).voidsetMaxSuspensionForce(float maxForce) Alter the force exerted by each wheel's suspension (native field: m_maxSuspensionForce).voidsetMaxSuspensionTravelCm(float travelCm) Alter the maximum travel distance for the suspension (native field: m_maxSuspensionTravelCm).voidsetSuspensionCompression(float damping) Alter the suspension damping when compressed (native field: m_suspensionCompression).voidsetSuspensionDamping(float damping) Alter the suspension damping when expanded (native field: m_suspensionDamping).voidsetSuspensionStiffness(float stiffness) Alter the stiffness of the suspension (native field: m_suspensionStiffness).Methods inherited from class com.jme3.bullet.NativePhysicsObjectcompareTo, countTrackers, dumpTrackers, equals, freeUnusedObjects, hasAssignedNativeObject, hashCode, nativeId, reassignNativeId, setNativeId, setNativeIdNotTracked, toString, unassignNativeObject
- 
Field Details- 
loggermessage logger for this class
 
- 
- 
Constructor Details- 
VehicleTuningpublic VehicleTuning()Instantiate an instance with the default parameter values.
 
- 
- 
Method Details- 
getFrictionSlippublic float getFrictionSlip()Return the friction between tires and ground (native field: m_frictionSlip).- Returns:
- the coefficient of friction
 
- 
getMaxSuspensionForcepublic float getMaxSuspensionForce()Return the maximum force exerted by each wheel's suspension (native field: m_maxSuspensionForce).- Returns:
- the maximum force
 
- 
getMaxSuspensionTravelCmpublic float getMaxSuspensionTravelCm()Determine the maximum travel distance for each wheel's suspension (native field: m_maxSuspensionTravelCm).Note that the units are centimeters ONLY if the physics-space unit is exactly one meter. - Returns:
- the maximum amount the suspension can be compressed or expanded, relative to its rest length (in hundredths of a physics-space unit)
 
- 
getSuspensionCompressionpublic float getSuspensionCompression()Return the suspension damping when compressed (native field: m_suspensionCompression).- Returns:
- the damping amount
 
- 
getSuspensionDampingpublic float getSuspensionDamping()Return the suspension damping when expanded (native field: m_suspensionDamping).- Returns:
- the damping amount (0→no damping, default=0.88)
 
- 
getSuspensionStiffnesspublic float getSuspensionStiffness()Return the suspension stiffness (native field: m_suspensionStiffness).- Returns:
- the stiffness constant
 
- 
setFrictionSlippublic void setFrictionSlip(float coeff) Alter the friction between tires and ground (native field: m_frictionSlip).- Parameters:
- coeff- the desired coefficient of friction (0.8→realistic car, 10000→kart racer, default=10.5)
 
- 
setMaxSuspensionForcepublic void setMaxSuspensionForce(float maxForce) Alter the force exerted by each wheel's suspension (native field: m_maxSuspensionForce).- Parameters:
- maxForce- the desired maximum force (default=6000)
 
- 
setMaxSuspensionTravelCmpublic void setMaxSuspensionTravelCm(float travelCm) Alter the maximum travel distance for the suspension (native field: m_maxSuspensionTravelCm). Note that the units are centimeters ONLY if the physics-space unit is exactly one meter.- Parameters:
- travelCm- the desired maximum amount the suspension can be compressed or expanded, relative to its rest length (in hundredths of a physics-space unit, default=500)
 
- 
setSuspensionCompressionpublic void setSuspensionCompression(float damping) Alter the suspension damping when compressed (native field: m_suspensionCompression).- Parameters:
- damping- the desired damping amount (0→no damping, default=0.83)
 
- 
setSuspensionDampingpublic void setSuspensionDamping(float damping) Alter the suspension damping when expanded (native field: m_suspensionDamping).- Parameters:
- damping- the desired damping (0→no damping, default=0.88)
 
- 
setSuspensionStiffnesspublic void setSuspensionStiffness(float stiffness) Alter the stiffness of the suspension (native field: m_suspensionStiffness).- Parameters:
- stiffness- the desired stiffness constant (10→off-road buggy, 50→sports car, 200→Formula-1 race car, default=5.88)
 
 
-