Interface ConstSoftBodyCreationSettings
- All Superinterfaces:
Comparable<JoltPhysicsObject>
,ConstJoltPhysicsObject
- All Known Implementing Classes:
SoftBodyCreationSettings
Read-only access to a
SoftBodyCreationSettings
object. (native type:
const SoftBodyCreationSettings)-
Method Summary
Modifier and TypeMethodDescriptionboolean
Test whether the created body will be allowed to fall asleep.Access the collision group.float
Return the friction ratio.float
Return the gravity factor.float
Return the linear damping constant.boolean
Test whether to bake rotation into the vertices and set the body rotation to identity.float
Return the maximum linear speed.int
Return the number of solver iterations.int
Return the index of the object layer.Copy the (initial) location.float
Return the pressure.float
Return the restitution ratio.Copy the (initial) orientation of the body's axes.Access the shared settings.boolean
Test whether to update the position of the body during simulation.long
Return the user data.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
getAllowSleeping
boolean getAllowSleeping()Test whether the created body will be allowed to fall asleep. The settings are unaffected.- Returns:
true
if allowed, otherwisefalse
-
getCollisionGroup
ConstCollisionGroup getCollisionGroup()Access the collision group.- Returns:
- a new JVM object with the pre-existing native object assigned
-
getFriction
float getFriction()Return the friction ratio. The settings are unaffected.- Returns:
- the ratio (typically ≥0 and ≤1)
-
getGravityFactor
float getGravityFactor()Return the gravity factor. The settings are unaffected.- Returns:
- the factor
-
getLinearDamping
float getLinearDamping()Return the linear damping constant. The settings are unaffected.- Returns:
- the constant (in units of per second, ≥0, ≤1)
-
getMakeRotationIdentity
boolean getMakeRotationIdentity()Test whether to bake rotation into the vertices and set the body rotation to identity. The settings are unaffected.- Returns:
true
if rotation will be baked in, otherwisefalse
-
getMaxLinearVelocity
float getMaxLinearVelocity()Return the maximum linear speed. The settings are unaffected.- Returns:
- the maximum speed (in meters per second)
-
getNumIterations
int getNumIterations()Return the number of solver iterations. The settings are unaffected.- Returns:
- the number of iterations
-
getObjectLayer
int getObjectLayer()Return the index of the object layer. The settings are unaffected.- Returns:
- the layer index (≥0, <numObjectLayers)
-
getPosition
RVec3 getPosition()Copy the (initial) location. The settings are unaffected.- Returns:
- a new location vector (in system coordinates, all components finite)
-
getPressure
float getPressure()Return the pressure. The settings are unaffected.- Returns:
- the pressure
-
getRestitution
float getRestitution()Return the restitution ratio. The settings are unaffected.- Returns:
- the ratio (typically ≥0 and ≤1)
-
getRotation
Quat getRotation()Copy the (initial) orientation of the body's axes. The settings are unaffected.- Returns:
- a new rotation quaternion (relative to the system axes)
-
getSettings
ConstSoftBodySharedSettings getSettings()Access the shared settings.- Returns:
- a new JVM object with the pre-existing native object assigned, or
null
if none
-
getUpdatePosition
boolean getUpdatePosition()Test whether to update the position of the body during simulation. The settings are unaffected.- Returns:
true
if the position will be updated, otherwisefalse
-
getUserData
long getUserData()Return the user data. The settings are unaffected. (native member: mUserData)- Returns:
- the value
-