Interface ConstBodyCreationSettings
- All Superinterfaces:
Comparable<JoltPhysicsObject>
,ConstJoltPhysicsObject
- All Known Implementing Classes:
BodyCreationSettings
,Part
Read-only access to a
BodyCreationSettings
object. (native type:
const BodyCreationSettings)-
Method Summary
Modifier and TypeMethodDescriptionboolean
Test whether a static body can be converted to kinematic or dynamic.int
Return the body's degrees of freedom.boolean
Test whether the created body will be allowed to fall asleep.float
Return the angular damping constant.Copy the (initial) angular velocity.boolean
Test whether the gyroscopic force will be applied.Access the collision group.boolean
Test whether extra effort should be made to remove ghost contacts.float
Return the friction ratio.float
Return the gravity factor.boolean
Test whether the body will be a sensor.float
Return the linear damping constant.Copy the (initial) linear velocity.Calculate the mass and inertia.Access the mass-properties override.float
Return the maximum angular speed.float
Return the maximum linear speed.Return the motion quality.Return the motion type.int
Return the index of the object layer.Return how the mass-properties override will be used.Copy the (initial) location.float
Return the restitution ratio.Copy the (initial) orientation of the body's axes.getShape()
Acquire read-only access to theShape
.boolean
Test whether the body's mass properties will be calculated.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
getAllowDynamicOrKinematic
boolean getAllowDynamicOrKinematic()Test whether a static body can be converted to kinematic or dynamic. The settings are unaffected.- Returns:
true
if convertible, otherwisefalse
-
getAllowedDofs
int getAllowedDofs()Return the body's degrees of freedom. The settings are unaffected.- Returns:
- a bitmask (see
EAllowedDofs
for semantics)
-
getAllowSleeping
boolean getAllowSleeping()Test whether the created body will be allowed to fall asleep. The settings are unaffected.- Returns:
true
if allowed, otherwisefalse
-
getAngularDamping
float getAngularDamping()Return the angular damping constant. The settings are unaffected.- Returns:
- the constant (in units of per second, ≥0, ≤1)
-
getAngularVelocity
Vec3 getAngularVelocity()Copy the (initial) angular velocity. The settings are unaffected.- Returns:
- a new velocity vector (radians per second in system coordinates)
-
getApplyGyroscopicForce
boolean getApplyGyroscopicForce()Test whether the gyroscopic force will be applied. The settings are unaffected.- Returns:
true
if enabled, otherwisefalse
-
getCollisionGroup
ConstCollisionGroup getCollisionGroup()Access the collision group.- Returns:
- a new JVM object with the pre-existing native object assigned
-
getEnhancedInternalEdgeRemoval
boolean getEnhancedInternalEdgeRemoval()Test whether extra effort should be made to remove ghost contacts. The settings are unaffected.- Returns:
true
for extra effort, otherwisefalse
-
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
-
getIsSensor
boolean getIsSensor()Test whether the body will be a sensor. The settings are unaffected.- Returns:
true
for a sensor, otherwisefalse
-
getLinearDamping
float getLinearDamping()Return the linear damping constant. The settings are unaffected.- Returns:
- the constant (in units of per second, ≥0, ≤1)
-
getLinearVelocity
Vec3 getLinearVelocity()Copy the (initial) linear velocity. The settings are unaffected.- Returns:
- a new velocity vector (meters per second in system coordinates)
-
getMassProperties
MassProperties getMassProperties()Calculate the mass and inertia. The settings are unaffected.- Returns:
- a new JVM object with a new native object assigned
-
getMassPropertiesOverride
ConstMassProperties getMassPropertiesOverride()Access the mass-properties override.- Returns:
- a new JVM object with the pre-existing native object assigned
-
getMaxAngularVelocity
float getMaxAngularVelocity()Return the maximum angular speed. The settings are unaffected.- Returns:
- the maximum speed (in radians per second)
-
getMaxLinearVelocity
float getMaxLinearVelocity()Return the maximum linear speed. The settings are unaffected.- Returns:
- the maximum speed (in meters per second)
-
getMotionQuality
EMotionQuality getMotionQuality()Return the motion quality. The settings are unaffected.- Returns:
- an enum value (not null)
-
getMotionType
EMotionType getMotionType()Return the motion type. The settings are unaffected.- Returns:
- an enum value (not null)
-
getObjectLayer
int getObjectLayer()Return the index of the object layer. The settings are unaffected.- Returns:
- the layer index (≥0, <numObjectLayers)
-
getOverrideMassProperties
EOverrideMassProperties getOverrideMassProperties()Return how the mass-properties override will be used. The settings are unaffected.- Returns:
- an enum value (not null)
-
getPosition
RVec3 getPosition()Copy the (initial) location. The settings are unaffected.- Returns:
- a new location vector (in system coordinates, all components finite)
-
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)
-
getShape
ConstShape getShape()Acquire read-only access to theShape
. The settings are unaffected.- Returns:
- a new JVM object with the pre-existing native object assigned, or
null
-
hasMassProperties
boolean hasMassProperties()Test whether the body's mass properties will be calculated. The settings are unaffected.- Returns:
true
if calculated, otherwisefalse
-