Package com.github.stephengold.joltjni
Class BodyCreationSettings
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.BodyCreationSettings
- All Implemented Interfaces:
ConstBodyCreationSettings
,ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
- Direct Known Subclasses:
Part
Settings used to create a rigid body. Such settings are described as "cooked"
if an actual shape has been assigned, or "uncooked" if there's no actual
shape yet.
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiate default settings (uncooked).Instantiate a copy of the specified settings.BodyCreationSettings
(ConstShape shape, RVec3Arg loc, QuatArg orient, EMotionType motionType, int objLayer) Instantiate cooked settings for the specified shape.BodyCreationSettings
(ConstShapeSettings shapeSettings, RVec3Arg loc, QuatArg orient, EMotionType motionType, int objLayer) Instantiate uncooked settings for the specified shape settings.BodyCreationSettings
(ShapeRef shapeRef, RVec3Arg loc, QuatArg orient, EMotionType motionType, int objLayer) Instantiate settings for the specified shape reference. -
Method Summary
Modifier and TypeMethodDescriptionPrepare for simulation by attempting to cook theShapeSettings
member into a shape.boolean
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.boolean
Test whether a kinematic body will collide with kinematic/static bodies.Access the collision group to which the body will belong.boolean
Test whether extra effort should be made to remove ghost contacts.float
Return the friction ratio.float
Return the gravity factor.float
Return the multiplier for inertia calculations.boolean
Test whether the body will be a sensor.float
Return the linear damping constant.Copy the (initial) linear velocity.Calculate the body's 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 override for the number position iterations in the solver.getNumPositionStepsOverride
(int numSteps) Override the number position iterations in the solver.int
Return the override for the number velocity iterations in the solver.getNumVelocityStepsOverride
(int numSteps) Override the number velocity iterations in the solver.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 the shape.Acquire read-only access to theShapeSettings
.boolean
Test whether manifold reduction will be enabled.long
Return the body's user data: can be used for anything.boolean
Test whether mass properties are required.void
restoreBinaryState
(StreamIn stream) Read the state of this object from the specified stream, excluding the shape and group filter.void
saveBinaryState
(StreamOut stream) Write the state of this object to the specified stream, excluding the shape, materials, and group filter.void
saveWithChildren
(StreamOut stream, ShapeToIdMap shapeMap, MaterialToIdMap materialMap, GroupFilterToIdMap filterMap) Write the state of this object to the specified stream.setAllowDynamicOrKinematic
(boolean setting) Alter whether a static body can be converted to kinematic or dynamic.setAllowedDofs
(int bitmask) Alter the body's degrees of freedom.setAllowSleeping
(boolean allow) Alter whether the created body will be allowed to fall asleep.setAngularDamping
(float damping) Alter the angular damping constant.setAngularVelocity
(Vec3Arg omega) Alter the (initial) angular velocity.setApplyGyroscopicForce
(boolean setting) Alter whether gyroscopic force will be applied.setCollideKinematicVsNonDynamic
(boolean setting) Alter whether a kinematic body will collide with kinematic/static bodies.Alter the collision group to which the body will belong.setEnhancedInternalEdgeRemoval
(boolean enhance) Alter whether extra effort should be made to remove ghost contacts.setFriction
(float friction) Alter the friction ratio.setGravityFactor
(float factor) Alter the gravity multiplier.setInertiaMultiplier
(float factor) Alter the inertia multiplier.setIsSensor
(boolean setting) Alter whether the body will be a sensor.setLinearDamping
(float damping) Alter the linear damping constant.setLinearVelocity
(Vec3Arg velocity) Alter the (initial) linear velocity.setMassPropertiesOverride
(ConstMassProperties properties) Alter the mass-properties override.setMaxAngularVelocity
(float maxSpeed) Alter the maximum angular speed.setMaxLinearVelocity
(float maxSpeed) Alter the maximum linear speed.setMotionQuality
(EMotionQuality motionQuality) Alter the motion quality.setMotionType
(EMotionType motionType) Alter the motion type.setObjectLayer
(int objLayer) Alter the object layer.Alter how the mass-properties override will be used.setPosition
(double xx, double yy, double zz) Alter the (initial) location of the body's origin (which might not coincide with its center of mass).setPosition
(RVec3Arg location) Alter the (initial) location of the body's origin (which might not coincide with its center of mass).setRestitution
(float restitution) Alter the restitution ratio for collisions.setRotation
(QuatArg quat) Alter the (initial) orientation of the body's axes.setShape
(ConstShape shape) Replace the shape and null out the shape settings.setShapeSettings
(ConstShapeSettings shapeSettings) Replace the shape settings and null out the shape.setUseManifoldReduction
(boolean setting) Alter whether manifold reduction will be enabled.setUserData
(long value) Alter the body's user data.static BcsResult
sRestoreWithChildren
(StreamIn stream, IdToShapeMap shapeMap, IdToMaterialMap materialMap, IdToGroupFilterMap filterMap) Read a settings object from the specified binary stream.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Constructor Details
-
BodyCreationSettings
public BodyCreationSettings()Instantiate default settings (uncooked). -
BodyCreationSettings
Instantiate a copy of the specified settings.- Parameters:
original
- the settings to copy (notnull
, unaffected)
-
BodyCreationSettings
public BodyCreationSettings(ConstShape shape, RVec3Arg loc, QuatArg orient, EMotionType motionType, int objLayer) Instantiate cooked settings for the specified shape.- Parameters:
shape
- the desired shape (not null)loc
- the desired location (not null, unaffected)orient
- the desired orientation (not null, unaffected)motionType
- the desired motion type (not null)objLayer
- the ID of the desired object layer (≥0)
-
BodyCreationSettings
public BodyCreationSettings(ShapeRef shapeRef, RVec3Arg loc, QuatArg orient, EMotionType motionType, int objLayer) Instantiate settings for the specified shape reference.- Parameters:
shapeRef
- a reference to the desired shape (not null)loc
- the desired location (not null, unaffected)orient
- the desired orientation (not null, unaffected)motionType
- the desired motion type (not null)objLayer
- the ID of the desired object layer
-
BodyCreationSettings
public BodyCreationSettings(ConstShapeSettings shapeSettings, RVec3Arg loc, QuatArg orient, EMotionType motionType, int objLayer) Instantiate uncooked settings for the specified shape settings.- Parameters:
shapeSettings
- the desired shape settings (not null)loc
- the desired location (not null, unaffected)orient
- the desired orientation (not null, unaffected)motionType
- the desired motion type (not null)objLayer
- the ID of the desired object layer
-
-
Method Details
-
convertShapeSettings
Prepare for simulation by attempting to cook theShapeSettings
member into a shape. After invoking this method,ObjectStream
serialization is inhibited.- Returns:
- a new object (Remember to test it for errors!)
-
restoreBinaryState
Read the state of this object from the specified stream, excluding the shape and group filter.- Parameters:
stream
- where to read objects from (not null)
-
setAllowDynamicOrKinematic
Alter whether a static body can be converted to kinematic or dynamic. (native member: mAllowDynamicOrKinematic)- Parameters:
setting
-true
to allow orfalse
to inhibit (default=false)- Returns:
- the modified settings, for chaining
-
setAllowedDofs
Alter the body's degrees of freedom. (native member: mAllowedDOFs)- Parameters:
bitmask
- the desired bitmask (seeEAllowedDofs
for semantics, default=All)- Returns:
- the modified settings, for chaining
-
setAllowSleeping
Alter whether the created body will be allowed to fall asleep. (native member: mAllowSleeping)- Parameters:
allow
-true
to allow,false
to inhibit (default=true)- Returns:
- the modified settings, for chaining
-
setAngularDamping
Alter the angular damping constant. (native member: mAngularDamping)- Parameters:
damping
- the desired value (in units of per second, ≥0, ≤1, default=0.05)- Returns:
- the modified settings, for chaining
-
setAngularVelocity
Alter the (initial) angular velocity. (native member: mAngularVelocity)- Parameters:
omega
- the desired angular velocity (radians per second in system coordinates, not null, unaffected, default=(0,0,0))- Returns:
- the modified settings, for chaining
-
setApplyGyroscopicForce
Alter whether gyroscopic force will be applied. (native member: mApplyGyroscopicForce)- Parameters:
setting
-true
to enable the force, orfalse
to disable it (default=false)- Returns:
- the modified settings, for chaining
-
setCollideKinematicVsNonDynamic
Alter whether a kinematic body will collide with kinematic/static bodies. (native member: mCollideKinematicVsNonDynamic)- Parameters:
setting
-true
to collide, orfalse
to disable collisions (default=false)- Returns:
- the modified settings, for chaining
-
setCollisionGroup
Alter the collision group to which the body will belong. (native member: mCollisionGroup)- Parameters:
group
- the desired group (not null, unaffected)- Returns:
- the modified settings, for chaining
-
setEnhancedInternalEdgeRemoval
Alter whether extra effort should be made to remove ghost contacts. (native member: mEnhancedInternalEdgeRemoval)- Parameters:
enhance
-true
for extra effort,false
for ordinary effort (default=false)- Returns:
- the modified settings, for chaining
-
setFriction
Alter the friction ratio. (native member: mFriction)- Parameters:
friction
- the desired ratio (typically ≥0 and ≤1, default=0.2)- Returns:
- the modified settings, for chaining
-
setGravityFactor
Alter the gravity multiplier. (native member: mGravityFactor)- Parameters:
factor
- the desired multiplier (default=1)- Returns:
- the modified settings, for chaining
-
setInertiaMultiplier
Alter the inertia multiplier. (native member: mInertiaMultiplier)- Parameters:
factor
- the desired multiplier (default=1)- Returns:
- the modified settings, for chaining
-
setIsSensor
Alter whether the body will be a sensor. (native member: mIsSensor)- Parameters:
setting
-true
for a sensor, otherwisefalse
(default=false)- Returns:
- the modified settings, for chaining
-
setLinearDamping
Alter the linear damping constant. (native member: mLinearDamping)- Parameters:
damping
- the desired value (in units of per second, ≥0, ≤1, default=0.05)- Returns:
- the modified settings, for chaining
-
setLinearVelocity
Alter the (initial) linear velocity. (native member: mLinearVelocity)- Parameters:
velocity
- the desired velocity (in system coordinates, not null, unaffected, default=(0,0,0))- Returns:
- the modified settings, for chaining
-
setMassPropertiesOverride
Alter the mass-properties override. (native member: mMassPropertiesOverride)- Parameters:
properties
- the desired properties (not null, unaffected)- Returns:
- the modified settings, for chaining
-
setMaxAngularVelocity
Alter the maximum angular speed. (native member: mMaxAngularVelocity)- Parameters:
maxSpeed
- the desired maximum speed (in radians per second, ≥0, default=15*pi)- Returns:
- the modified settings, for chaining
-
setMaxLinearVelocity
Alter the maximum linear speed. (native member: mMaxLinearVelocity)- Parameters:
maxSpeed
- the desired maximum speed (in meters per second, ≥0, default=500)- Returns:
- the modified settings, for chaining
-
setMotionQuality
Alter the motion quality. (native member: mMotionQuality)- Parameters:
motionQuality
- the desired quality (not null, default=Discrete)- Returns:
- the modified settings, for chaining
-
setMotionType
Alter the motion type. (native member: mMotionType)- Parameters:
motionType
- the desired type (not null, default=Dynamic)- Returns:
- the modified settings, for chaining
-
getNumPositionStepsOverride
Override the number position iterations in the solver. Applicable only to a dynamic colliding body. (native member: mNumPositionStepsOverride)- Parameters:
numSteps
- the desired number, or 0 to use the default inPhysicsSettings
)- Returns:
- the modified settings, for chaining
-
getNumVelocityStepsOverride
Override the number velocity iterations in the solver. Applicable only to a dynamic colliding body. (native member: mNumVelocityStepsOverride)- Parameters:
numSteps
- the desired number, or 0 to use the default inPhysicsSettings
)- Returns:
- the modified settings, for chaining
-
setObjectLayer
Alter the object layer. (native member: mObjectLayer)- Parameters:
objLayer
- the index of the desired object layer (≥0, <numObjectLayers, <65536, default=0)- Returns:
- the modified settings, for chaining
-
setOverrideMassProperties
Alter how the mass-properties override will be used. (native member: mOverrideMassProperties)- Parameters:
setting
- an enum value (not null, default=CalculateMassAndInertia)- Returns:
- the modified settings, for chaining
-
setPosition
Alter the (initial) location of the body's origin (which might not coincide with its center of mass). (native member: mPosition)- Parameters:
xx
- the desired X coordinate (in system coordinates, default=0)yy
- the desired Y coordinate (in system coordinates, default=0)zz
- the desired Z coordinate (in system coordinates, default=0)- Returns:
- the modified settings, for chaining
-
setPosition
Alter the (initial) location of the body's origin (which might not coincide with its center of mass). (native member: mPosition)- Parameters:
location
- the desired location (in system coordinates, not null, unaffected, default=(0,0,0))- Returns:
- the modified settings, for chaining
-
setRestitution
Alter the restitution ratio for collisions. (native member: mRestitution)- Parameters:
restitution
- the desired ratio (typically ≥0 and ≤1, default=0)- Returns:
- the modified settings, for chaining
-
setRotation
Alter the (initial) orientation of the body's axes. (native member: mRotation)- Parameters:
quat
- the desired rotation (relative to the system axes, not null, normalized, unaffected, default=(0,0,0,1))- Returns:
- the modified settings, for chaining
-
setShape
Replace the shape and null out the shape settings.- Parameters:
shape
- the desired shape (unaffected) ornull
- Returns:
- the modified settings, for chaining
-
setShapeSettings
Replace the shape settings and null out the shape. After invoking this method, the body-creation settings will be in an "uncooked" state.- Parameters:
shapeSettings
- the desired shape settings (not null)- Returns:
- the modified settings, for chaining
-
setUseManifoldReduction
Alter whether manifold reduction will be enabled. (member data: mUseManifoldReduction)- Parameters:
setting
-true
to enable, orfalse
to disable- Returns:
- the modified settings, for chaining
-
setUserData
Alter the body's user data.- Parameters:
value
- the desired value (default=0)- Returns:
- the modified settings, for chaining
-
sRestoreWithChildren
public static BcsResult sRestoreWithChildren(StreamIn stream, IdToShapeMap shapeMap, IdToMaterialMap materialMap, IdToGroupFilterMap filterMap) Read a settings object from the specified binary stream.- Parameters:
stream
- where to read objects (not null)shapeMap
- track multiple uses of shapes (not null)materialMap
- track multiple uses of physics materials (not null)filterMap
- track multiple uses of group filters (not null)- Returns:
- a new object
-
getAllowDynamicOrKinematic
public boolean getAllowDynamicOrKinematic()Test whether a static body can be converted to kinematic or dynamic. The settings are unaffected. (native member: mAllowDynamicOrKinematic)- Specified by:
getAllowDynamicOrKinematic
in interfaceConstBodyCreationSettings
- Returns:
true
if convertible, otherwisefalse
-
getAllowedDofs
public int getAllowedDofs()Return the body's degrees of freedom. The settings are unaffected. (native member: mAllowedDOFs)- Specified by:
getAllowedDofs
in interfaceConstBodyCreationSettings
- Returns:
- a bitmask (see
EAllowedDofs
for semantics)
-
getAllowSleeping
public boolean getAllowSleeping()Test whether the created body will be allowed to fall asleep. The settings are unaffected. (native member: mAllowSleeping)- Specified by:
getAllowSleeping
in interfaceConstBodyCreationSettings
- Returns:
true
if allowed, otherwisefalse
-
getAngularDamping
public float getAngularDamping()Return the angular damping constant. The settings are unaffected. (native member: mAngularDamping)- Specified by:
getAngularDamping
in interfaceConstBodyCreationSettings
- Returns:
- the constant (in units of per second, ≥0, ≤1)
-
getAngularVelocity
Copy the (initial) angular velocity. The settings are unaffected. (native member: mAngularVelocity)- Specified by:
getAngularVelocity
in interfaceConstBodyCreationSettings
- Returns:
- a new velocity vector (radians per second in system coordinates)
-
getApplyGyroscopicForce
public boolean getApplyGyroscopicForce()Test whether the gyroscopic force will be applied. The settings are unaffected. (native member: mApplyGyroscopicForce)- Specified by:
getApplyGyroscopicForce
in interfaceConstBodyCreationSettings
- Returns:
true
if enabled, otherwisefalse
-
getCollideKinematicVsNonDynamic
public boolean getCollideKinematicVsNonDynamic()Test whether a kinematic body will collide with kinematic/static bodies. (native member: mCollideKinematicVsNonDynamic)- Specified by:
getCollideKinematicVsNonDynamic
in interfaceConstBodyCreationSettings
- Returns:
true
if it will collide, otherwisefalse
-
getCollisionGroup
Access the collision group to which the body will belong. (native member: mCollisionGroup)- Specified by:
getCollisionGroup
in interfaceConstBodyCreationSettings
- Returns:
- a new JVM object with the pre-existing native object assigned
-
getEnhancedInternalEdgeRemoval
public boolean getEnhancedInternalEdgeRemoval()Test whether extra effort should be made to remove ghost contacts. The settings are unaffected. (native member: mEnhancedInternalEdgeRemoval)- Specified by:
getEnhancedInternalEdgeRemoval
in interfaceConstBodyCreationSettings
- Returns:
true
for extra effort, otherwisefalse
-
getFriction
public float getFriction()Return the friction ratio. The settings are unaffected. (native member: mFriction)- Specified by:
getFriction
in interfaceConstBodyCreationSettings
- Returns:
- the ratio (typically ≥0 and ≤1)
-
getGravityFactor
public float getGravityFactor()Return the gravity factor. The settings are unaffected. (native member: mGravityFactor)- Specified by:
getGravityFactor
in interfaceConstBodyCreationSettings
- Returns:
- the factor
-
getInertiaMultiplier
public float getInertiaMultiplier()Return the multiplier for inertia calculations. (native member: mInertiaMultiplier)- Specified by:
getInertiaMultiplier
in interfaceConstBodyCreationSettings
- Returns:
- the factor
-
getIsSensor
public boolean getIsSensor()Test whether the body will be a sensor. The settings are unaffected. (native member: mIsSensor)- Specified by:
getIsSensor
in interfaceConstBodyCreationSettings
- Returns:
true
for a sensor, otherwisefalse
-
getLinearDamping
public float getLinearDamping()Return the linear damping constant. The settings are unaffected. (native member: mLinearDamping)- Specified by:
getLinearDamping
in interfaceConstBodyCreationSettings
- Returns:
- the constant (in units of per second, ≥0, ≤1)
-
getLinearVelocity
Copy the (initial) linear velocity. The settings are unaffected. (native member: mLinearVelocity)- Specified by:
getLinearVelocity
in interfaceConstBodyCreationSettings
- Returns:
- a new velocity vector (meters per second in system coordinates)
-
getMassProperties
Calculate the body's mass and inertia. As a side effect, this method may "cook" the settings.- Specified by:
getMassProperties
in interfaceConstBodyCreationSettings
- Returns:
- a new JVM object with a new native object assigned, or
null
if a shape is required but not available
-
getMassPropertiesOverride
Access the mass-properties override. (native member: mMassPropertiesOverride)- Specified by:
getMassPropertiesOverride
in interfaceConstBodyCreationSettings
- Returns:
- a new JVM object with the pre-existing native object assigned
-
getMaxAngularVelocity
public float getMaxAngularVelocity()Return the maximum angular speed. The settings are unaffected. (native member: mMaxAngularVelocity)- Specified by:
getMaxAngularVelocity
in interfaceConstBodyCreationSettings
- Returns:
- the maximum speed (in radians per second)
-
getMaxLinearVelocity
public float getMaxLinearVelocity()Return the maximum linear speed. The settings are unaffected. (native member: mMaxLinearVelocity)- Specified by:
getMaxLinearVelocity
in interfaceConstBodyCreationSettings
- Returns:
- the maximum speed (in meters per second)
-
getMotionQuality
Return the motion quality. The settings are unaffected. (native member: mMotionQuality)- Specified by:
getMotionQuality
in interfaceConstBodyCreationSettings
- Returns:
- an enum value (not null)
-
getMotionType
Return the motion type. The settings are unaffected. (native member: mMotionType)- Specified by:
getMotionType
in interfaceConstBodyCreationSettings
- Returns:
- an enum value (not null)
-
getNumPositionStepsOverride
public int getNumPositionStepsOverride()Return the override for the number position iterations in the solver. Applicable only to a dynamic colliding body. The settings are unaffected. (native member: mNumPositionStepsOverride)- Specified by:
getNumPositionStepsOverride
in interfaceConstBodyCreationSettings
- Returns:
- the number (0 → use default in
PhysicsSettings
)
-
getNumVelocityStepsOverride
public int getNumVelocityStepsOverride()Return the override for the number velocity iterations in the solver. Applicable only to a dynamic colliding body. The settings are unaffected. (native member: mNumVelocityStepsOverride)- Specified by:
getNumVelocityStepsOverride
in interfaceConstBodyCreationSettings
- Returns:
- the number (0 → use default in
PhysicsSettings
)
-
getObjectLayer
public int getObjectLayer()Return the index of the object layer. The settings are unaffected. (native member: mObjectLayer)- Specified by:
getObjectLayer
in interfaceConstBodyCreationSettings
- Returns:
- the layer index (≥0, <numObjectLayers)
-
getOverrideMassProperties
Return how the mass-properties override will be used. The settings are unaffected. (native member: mOverrideMassProperties)- Specified by:
getOverrideMassProperties
in interfaceConstBodyCreationSettings
- Returns:
- an enum value (not null)
-
getPosition
Copy the (initial) location. The settings are unaffected. (native member: mPosition)- Specified by:
getPosition
in interfaceConstBodyCreationSettings
- Returns:
- a new location vector (in system coordinates, all components finite)
-
getRestitution
public float getRestitution()Return the restitution ratio. The settings are unaffected. (native member: mRestitution)- Specified by:
getRestitution
in interfaceConstBodyCreationSettings
- Returns:
- the ratio (typically ≥0 and ≤1)
-
getRotation
Copy the (initial) orientation of the body's axes. The settings are unaffected. (native member: mRotation)- Specified by:
getRotation
in interfaceConstBodyCreationSettings
- Returns:
- a new rotation quaternion (relative to the system axes)
-
getShape
Acquire read-only access to the shape. As a side effect, if the body-creation settings aren't already cooked, this method cooks them.- Specified by:
getShape
in interfaceConstBodyCreationSettings
- Returns:
- a new JVM object, or
null
if the shape settings arenull
and the body-creation settings aren't cooked
-
getShapeSettings
Acquire read-only access to theShapeSettings
. The body-creation settings are unaffected.- Specified by:
getShapeSettings
in interfaceConstBodyCreationSettings
- Returns:
- a new JVM object with the pre-existing native object assigned, or
null
-
getUseManifoldReduction
public boolean getUseManifoldReduction()Test whether manifold reduction will be enabled. The settings are unaffected. (member data: mUseManifoldReduction)- Specified by:
getUseManifoldReduction
in interfaceConstBodyCreationSettings
- Returns:
true
if enabled, otherwisefalse
-
getUserData
public long getUserData()Return the body's user data: can be used for anything. The settings are unaffected. (member data: mUserData)- Specified by:
getUserData
in interfaceConstBodyCreationSettings
- Returns:
- the value
-
hasMassProperties
public boolean hasMassProperties()Test whether mass properties are required. The settings are unaffected.- Specified by:
hasMassProperties
in interfaceConstBodyCreationSettings
- Returns:
true
if required, otherwisefalse
-
saveBinaryState
Write the state of this object to the specified stream, excluding the shape, materials, and group filter. The settings are unaffected.- Specified by:
saveBinaryState
in interfaceConstBodyCreationSettings
- Parameters:
stream
- where to write objects (not null)
-
saveWithChildren
public void saveWithChildren(StreamOut stream, ShapeToIdMap shapeMap, MaterialToIdMap materialMap, GroupFilterToIdMap filterMap) Write the state of this object to the specified stream. The settings are unaffected.- Specified by:
saveWithChildren
in interfaceConstBodyCreationSettings
- Parameters:
stream
- where to write objects (not null)shapeMap
- track multiple uses of shapes (may be null)materialMap
- track multiple uses of physics materials (may be null)filterMap
- track multiple uses of group filters (may be null)
-