Package org.vivecraft.api.data
Enum Class VRBodyPart
- All Implemented Interfaces:
Serializable
,Comparable<VRBodyPart>
,Constable
Corresponds to the different tracked device roles that are supported by Vivecraft.
- Since:
- 1.3.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptioncorresponds to the player's headset, so it is at their eye positionMain hand of the player, this is the hand the player points with. -
Method Summary
Modifier and TypeMethodDescriptionboolean
availableInMode
(FBTMode fbtMode) Whether this body part type is available in the provided full-body tracking mode.static VRBodyPart
fromInteractionHand
(InteractionHand hand) Gets the corresponding VRBodyPart to the provided InteractionHandboolean
isFoot()
Checks ifthis
VRBodyPart is a footboolean
isHand()
Checks ifthis
VRBodyPart is a handopposite()
Gets the VRBodyPart which is the same type but on the opposite side of the body.static VRBodyPart
Returns the enum constant of this class with the specified name.static VRBodyPart[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MAIN_HAND
Main hand of the player, this is the hand the player points with. Which one that is can be identified withVRPose.isLeftHanded()
orVRClientAPI.isLeftHanded()
for the local player- Since:
- 1.3.0
-
OFF_HAND
-
RIGHT_FOOT
-
LEFT_FOOT
-
WAIST
-
RIGHT_KNEE
-
LEFT_KNEE
-
RIGHT_ELBOW
-
LEFT_ELBOW
-
HEAD
corresponds to the player's headset, so it is at their eye position- Since:
- 1.3.0
-
-
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
-
opposite
Gets the VRBodyPart which is the same type but on the opposite side of the body. VRBodyParts that don't have an opposite counterpart will return itself.- Returns:
- the opposite VRBodyPart
- Since:
- 1.3.0
-
fromInteractionHand
Gets the corresponding VRBodyPart to the provided InteractionHand- Parameters:
hand
- InteractionHand to convert- Returns:
- VRBodyPart that corresponds to the given InteractionHand
- Since:
- 1.3.0
-
availableInMode
Whether this body part type is available in the provided full-body tracking mode.- Parameters:
fbtMode
- The full-body tracking mode to check.- Returns:
- Whether this body part has available data in the provided mode.
- Since:
- 1.3.0
-
isFoot
public boolean isFoot()Checks ifthis
VRBodyPart is a foot- Returns:
- Whether this body part is a foot.
- Since:
- 1.3.0
-
isHand
public boolean isHand()Checks ifthis
VRBodyPart is a hand- Returns:
- Whether this body part is a hand.
- Since:
- 1.3.0
-