Package com.jme3.bullet.objects.infos
Class SoftBodyMaterial
java.lang.Object
com.jme3.bullet.NativePhysicsObject
com.jme3.bullet.objects.infos.SoftBodyMaterial
- All Implemented Interfaces:
Comparable<NativePhysicsObject>
Provide access to 3 fields of the native btSoftBody::Material struct.
-
Field Summary
Fields inherited from class com.jme3.bullet.NativePhysicsObject
loggerN
-
Constructor Summary
ConstructorDescriptionInstantiate a material with the default properties. -
Method Summary
Modifier and TypeMethodDescriptionfloat
Read the angular-stiffness coefficient (native field: m_kAST).float
Read the linear-stiffness coefficient (native field: m_kLST).void
setAngularStiffness
(float coefficient) Alter the angular-stiffness coefficient (native field: m_kAST).void
setLinearStiffness
(float coefficient) Alter the linear-stiffness coefficient (native field: m_kLST).void
setVolumeStiffness
(float coefficient) Alter the volume-stiffness coefficient (native field: m_kVST).float
Read the volume-stiffness coefficient (native field: m_kVST).Methods inherited from class com.jme3.bullet.NativePhysicsObject
compareTo, countTrackers, dumpTrackers, equals, freeUnusedObjects, hasAssignedNativeObject, hashCode, nativeId, reassignNativeId, setNativeId, setNativeIdNotTracked, toString, unassignNativeObject
-
Field Details
-
logger
message logger for this class
-
-
Constructor Details
-
SoftBodyMaterial
Instantiate a material with the default properties.- Parameters:
body
- the body to which this material will apply (not null)
-
-
Method Details
-
angularStiffness
public float angularStiffness()Read the angular-stiffness coefficient (native field: m_kAST).- Returns:
- the coefficient (≥0, ≤1)
-
linearStiffness
public float linearStiffness()Read the linear-stiffness coefficient (native field: m_kLST).- Returns:
- the coefficient (≥0, ≤1)
-
setAngularStiffness
public void setAngularStiffness(float coefficient) Alter the angular-stiffness coefficient (native field: m_kAST).- Parameters:
coefficient
- the desired coefficient (≥0, ≤1, default=1)
-
setLinearStiffness
public void setLinearStiffness(float coefficient) Alter the linear-stiffness coefficient (native field: m_kLST).- Parameters:
coefficient
- the desired coefficient (≥0, ≤1, default=1)
-
setVolumeStiffness
public void setVolumeStiffness(float coefficient) Alter the volume-stiffness coefficient (native field: m_kVST).- Parameters:
coefficient
- the desired coefficient (≥0, ≤1, default=1)
-
volumeStiffness
public float volumeStiffness()Read the volume-stiffness coefficient (native field: m_kVST).- Returns:
- the coefficient (≥0, ≤1)
-