Enum Class PlayerBodyPart
- All Implemented Interfaces:
Serializable,Comparable<PlayerBodyPart>,Constable
Enumeration of player body parts that can be controlled and interacted with in VR.
This enum defines all the different body parts that make up a player's physical representation in the physics world. Each body part has associated physics shapes, pivot points for joints, grab points for interaction, and tracking offsets for VR controller positioning.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptioncom.github.stephengold.joltjni.readonly.Vec3ArgGets the local grab point on this body part in RVec3 format.org.joml.Vector3fcnet.minecraft.world.phys.Vec3com.github.stephengold.joltjni.readonly.Vec3ArggetSize()Gets the full size of this body part.com.github.stephengold.joltjni.readonly.Vec3Argstatic PlayerBodyPartReturns the enum constant of this class with the specified name.static PlayerBodyPart[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HEAD
-
MAIN_HAND
-
OFF_HAND
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getSize
public com.github.stephengold.joltjni.readonly.Vec3Arg getSize()Gets the full size of this body part.The size represents the dimensions of the physics shape (width x height x depth). This is the full size, not half-extents.
- Returns:
- a vector representing the width, height, and depth
-
getLocalPivot
public net.minecraft.world.phys.Vec3 getLocalPivot() -
getGrabPoint
public com.github.stephengold.joltjni.readonly.Vec3Arg getGrabPoint()Gets the local grab point on this body part in RVec3 format.This point defines where objects are grabbed when a player tries to grab something with this body part. For hands, it's at the tip.
- Returns:
- a vector in local space representing the grab point (RVec3 format)
-
getGrabPointVec3f
public org.joml.Vector3fc getGrabPointVec3f() -
getTrackingOffset
public com.github.stephengold.joltjni.readonly.Vec3Arg getTrackingOffset()
-