Interface ConstSubShape
- All Superinterfaces:
Comparable<JoltPhysicsObject>
,ConstJoltPhysicsObject
- All Known Implementing Classes:
SubShape
Read-only access to a
SubShape
. (native type:
const CompoundShape::SubShape
)-
Method Summary
Modifier and TypeMethodDescriptiongetLocalTransformNoScale
(Vec3Arg scale) Calculate the local transform for this shape, given the scale of the child.Copy the center-of-mass location.Copy the rotation.getShape()
Access the child shape.boolean
isValidScale
(Vec3Arg scale) Test whether the specified scale is valid for the sub-shape.transformScale
(Vec3Arg scale) Transform the specified scale to the local space of the child.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
getLocalTransformNoScale
Calculate the local transform for this shape, given the scale of the child. The sub-shape is unaffected.- Parameters:
scale
- the scale of the child in the local space of this shape (not null, unaffected)- Returns:
- a new transform matrix
-
getPositionCom
Vec3 getPositionCom()Copy the center-of-mass location. The sub-shape is unaffected. (native function: GetPositionCOM)- Returns:
- a new vector
-
getRotation
Quat getRotation()Copy the rotation. The sub-shape is unaffected.- Returns:
- a new rotation quaternion
-
getShape
ConstShape getShape()Access the child shape. The sub-shape is unaffected.- Returns:
- a new JVM object with the pre-existing native object assigned
-
isValidScale
Test whether the specified scale is valid for the sub-shape. The sub-shape is unaffected.- Parameters:
scale
- the scale factors to validate (not null, unaffected)- Returns:
true
if valid, otherwisefalse
-
transformScale
Transform the specified scale to the local space of the child. The sub-shape is unaffected.- Parameters:
scale
- the scale to transform (not null, unaffected)- Returns:
- a new vector
-