Interface ConstCharacter
- All Superinterfaces:
Comparable<JoltPhysicsObject>
,ConstCharacterBase
,ConstJoltPhysicsObject
- All Known Implementing Classes:
Character
,CharacterRef
,CharacterRefC
Read-only access to a
Character
. (native type: const Character)-
Method Summary
Modifier and TypeMethodDescriptionint
Return the ID of the body associated with this character.Copy the location of the rigid body's center of mass using the locking body interface.getCenterOfMassPosition
(boolean lockBodies) Copy the location of the rigid body's center of mass.int
getLayer()
Return the character's object layer, using the locking body interface.int
getLayer
(boolean lockBodies) Return the character's object layer.Copy the linear velocity of the character using the locking body interface.getLinearVelocity
(boolean lockBodies) Copy the linear velocity of the character.Copy the location of the character using the locking body interface.getPosition
(boolean lockBodies) Copy the location of the character.void
getPositionAndRotation
(RVec3 storeLocation, Quat storeOrientation) Copy the position of the associated body using the locking body interface.void
getPositionAndRotation
(RVec3 storeLocation, Quat storeOrientation, boolean lockBodies) Copy the position of the associated body.Copy the orientation of the character using the locking body interface.getRotation
(boolean lockBodies) Copy the orientation of the character.Return a TransformedShape that represents the volume occupied by the character, using the locking body interface.getTransformedShape
(boolean lockBodies) Return a TransformedShape that represents the volume occupied by the character.Calculate the character's local-to-system coordinate transform using the locking body interface.getWorldTransform
(boolean lockBodies) Calculate the character's local-to-system coordinate transform.toRefC()
Create a counted reference to the nativeCharacter
.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstCharacterBase
getCosMaxSlopeAngle, getGroundBodyId, getGroundMaterial, getGroundNormal, getGroundPosition, getGroundState, getGroundSubShapeId, getGroundUserData, getGroundVelocity, getShape, getUp, isSlopeTooSteep, isSupported, saveState
Methods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
getBodyId
int getBodyId()Return the ID of the body associated with this character. The character is unaffected.- Returns:
- the
BodyID
value
-
getCenterOfMassPosition
RVec3 getCenterOfMassPosition()Copy the location of the rigid body's center of mass using the locking body interface. The character is unaffected.- Returns:
- a new location vector (in system coordinates)
-
getCenterOfMassPosition
Copy the location of the rigid body's center of mass. The character is unaffected.- Parameters:
lockBodies
-true
→ use the locking body interface,false
→ use the non-locking body interface (default=true)- Returns:
- a new location vector (in system coordinates)
-
getLayer
int getLayer()Return the character's object layer, using the locking body interface. The character is unaffected.- Returns:
- a layer index (≥0)
-
getLayer
int getLayer(boolean lockBodies) Return the character's object layer. The character is unaffected.- Parameters:
lockBodies
-true
→ use the locking body interface,false
→ use the non-locking body interface (default=true)- Returns:
- a layer index (≥0)
-
getLinearVelocity
Vec3 getLinearVelocity()Copy the linear velocity of the character using the locking body interface. The character is unaffected.- Returns:
- a new velocity vector (meters per second in system coordinates)
-
getLinearVelocity
Copy the linear velocity of the character. The character is unaffected.- Parameters:
lockBodies
-true
→ use the locking body interface,false
→ use the non-locking body interface (default=true)- Returns:
- a new velocity vector (meters per second in system coordinates)
-
getPosition
RVec3 getPosition()Copy the location of the character using the locking body interface. The character is unaffected.- Returns:
- a new location vector (in system coordinates)
-
getPosition
Copy the location of the character. The character is unaffected.- Parameters:
lockBodies
-true
→ use the locking body interface,false
→ use the non-locking body interface (default=true)- Returns:
- a new location vector (in system coordinates)
-
getPositionAndRotation
Copy the position of the associated body using the locking body interface. The character is unaffected.- Parameters:
storeLocation
- storage for the location (in system coordinates, not null, modified)storeOrientation
- storage for the orientation (in system coordinates, not null, modified)
-
getPositionAndRotation
Copy the position of the associated body. The character is unaffected.- Parameters:
storeLocation
- storage for the location (in system coordinates, not null, modified)storeOrientation
- storage for the orientation (in system coordinates, not null, modified)lockBodies
-true
→ use the locking body interface,false
→ use the non-locking body interface (default=true)
-
getRotation
Quat getRotation()Copy the orientation of the character using the locking body interface. The character is unaffected.- Returns:
- a new rotation quaternion (in system coordinates)
-
getRotation
Copy the orientation of the character. The character is unaffected.- Parameters:
lockBodies
-true
→ use the locking body interface,false
→ use the non-locking body interface (default=true)- Returns:
- a new rotation quaternion (in system coordinates)
-
getTransformedShape
TransformedShape getTransformedShape()Return a TransformedShape that represents the volume occupied by the character, using the locking body interface. The character is unaffected.- Returns:
- a new object
-
getTransformedShape
Return a TransformedShape that represents the volume occupied by the character. The character is unaffected.- Parameters:
lockBodies
-true
→ use the locking body interface,false
→ use the non-locking body interface (default=true)- Returns:
- a new object
-
getWorldTransform
RMat44 getWorldTransform()Calculate the character's local-to-system coordinate transform using the locking body interface. The character is unaffected.- Returns:
- a new coordinate transform matrix
-
getWorldTransform
Calculate the character's local-to-system coordinate transform. The character is unaffected.- Parameters:
lockBodies
-true
→ use the locking body interface,false
→ use the non-locking body interface (default=true)- Returns:
- a new transform matrix
-
toRefC
CharacterRefC toRefC()Create a counted reference to the nativeCharacter
.- Returns:
- a new JVM object with a new native object assigned
-