Interface ConstBodyCreationSettings
- All Superinterfaces:
Comparable<ConstJoltPhysicsObject>,ConstJoltPhysicsObject
- All Known Implementing Classes:
BodyCreationSettings,Part
Read-only access to a
BodyCreationSettings object. (native type:
const BodyCreationSettings)-
Method Summary
Modifier and TypeMethodDescriptionbooleanTest whether the created body will be allowed to fall asleep.floatReturn the angular damping constant.Copy the (initial) angular velocity.floatReturn the friction ratio.floatReturn the gravity factor.booleanTest whether the body will be a sensor.floatReturn the linear damping constant.Copy the (initial) linear velocity.Calculate the mass and inertia.Copy the mass-properties override.floatReturn the maximum angular speed.floatReturn the maximum linear speed.Return the motion quality.Return the motion type.intReturn the index of the object layer.Return how the mass-properties override will be used.Return the (initial) location.floatReturn the restitution ratio.Copy the (initial) orientation of the body's axes.getShape()Acquire read-only access to theShape.booleanTest whether the body's mass properties will be calculated.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, va
-
Method Details
-
getAllowSleeping
boolean getAllowSleeping()Test whether the created body will be allowed to fall asleep. The settings are unaffected.- Returns:
- true if allowed, otherwise false
-
getAngularDamping
float getAngularDamping()Return the angular damping constant. The settings are unaffected.- Returns:
- the constant (in units of 1/second, ≥0, ≤1)
-
getAngularVelocity
Vec3 getAngularVelocity()Copy the (initial) angular velocity. The settings are unaffected.- Returns:
- a new velocity vector (radians per second in physics-system coordinates)
-
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, otherwise false
-
getLinearDamping
float getLinearDamping()Return the linear damping constant. The settings are unaffected.- Returns:
- the constant (in units of 1/second, ≥0, ≤1)
-
getLinearVelocity
Vec3 getLinearVelocity()Copy the (initial) linear velocity. The settings are unaffected.- Returns:
- a new velocity vector (meters per second in physics-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
MassProperties getMassPropertiesOverride()Copy the mass-properties override. The settings are unaffected.- Returns:
- a new JVM object with a new native object assigned
-
getMaxAngularVelocity
float getMaxAngularVelocity()Return the maximum angular speed. The settings are unaffected.- Returns:
- the maximum speed (in radians/second)
-
getMaxLinearVelocity
float getMaxLinearVelocity()Return the maximum linear speed. The settings are unaffected.- Returns:
- the maximum speed (in meters/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()Return the (initial) location. The settings are unaffected.- Returns:
- a new location vector (in physics-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 physics-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, otherwise false
-