GRPLJointManager Public class
Description
Takes the Joint data from XRHandSubsystem and maps them to our own RhinoxJoint structure. This manager also supplies and updates Capsule colliders with rigidbodies RhinoxJointCapsule . This manager also relays events from the XRHandSubsystem when tracking is either lost or acquired.
Diagram
flowchart LR
classDef interfaceStyle stroke-dasharray: 5 5;
classDef abstractStyle stroke-width:4px
subgraph Rhinox.XR.Grapple
Rhinox.XR.Grapple.GRPLJointManager[[GRPLJointManager]]
end
subgraph UnityEngine
UnityEngine.MonoBehaviour[[MonoBehaviour]]
end
UnityEngine.MonoBehaviour --> Rhinox.XR.Grapple.GRPLJointManager
Members
Properties
Public properties
Type | Name | Methods |
---|---|---|
bool | AreJointsInitialised A boolean variable that indicates if the joints are initialized. | get, private set |
bool | IsLeftHandTracked A boolean variable that indicates if the left hand is being tracked. | get, private set |
bool | IsRightHandTracked A boolean variable that indicates if the right hand is being tracked. | get, private set |
bool | JointCollisionsEnabled A boolean property that gets or sets the value of _jointCollisionsEnabled. When this value is set, it also sets the collisions of the hands with the joint capsules. | get, set |
RhinoxJointCapsule [] | LeftHandCapsules An array of RhinoxJointCapsule objects that represent the joint capsules of the left hand. | get |
GameObject | LeftHandParentObj A GameObject variable that represents the parent object of the left hand. | get |
GameObject | LeftHandSocket A GameObject variable that represents the socket used to attach objects to the left hand. | get |
RhinoxJointCapsule [] | RightHandCapsules An array of RhinoxJointCapsule objects that represent the joint capsules of the right hand. | get |
GameObject | RightHandParentObj A GameObject variable that represents the parent object of the right hand. | get |
GameObject | RightHandSocket A GameObject variable that represents the socket used to attach objects to the right hand. | get |
Methods
Public methods
Returns | Name |
---|---|
void | DisableHandCollisions (RhinoxHand hand)This method enables collisions for the hand specified by the RhinoxHand parameter. It internally calls the method SetHandCollisions with a false value for the state parameter and the specified RhinoxHand. |
void | DisableHandCollisionsAfterDelay (RhinoxHand hand) |
void | EnableHandCollisions (RhinoxHand hand)This method enables collisions for the hand specified by the RhinoxHand parameter. It internally calls the method SetHandCollisions with a true value for the state parameter and the specified RhinoxHand. |
void | EnableHandCollisionsAfterDelay (RhinoxHand hand) |
ICollection <RhinoxJoint > | GetJointsFromBothHand (XRHandJointID jointID)Gets all joints with XRHandJointID “jointID” from both hands. |
void | SetHandCollisions (bool state, RhinoxHand hand) |
bool | TryGetFingerBend (RhinoxHand hand, RhinoxFinger finger, out float bendValue, bool remap) |
bool | TryGetJointFromHandById (XRHandJointID jointID, RhinoxHand rhinoxHand, out RhinoxJoint joint) |
bool | TryGetJointsFromHand (RhinoxHand rhinoxHand, out List <RhinoxJoint > jointList) |
Details
Summary
Takes the Joint data from XRHandSubsystem and maps them to our own RhinoxJoint structure. This manager also supplies and updates Capsule colliders with rigidbodies RhinoxJointCapsule . This manager also relays events from the XRHandSubsystem when tracking is either lost or acquired.
Remarks
Almost all classes in the Interaction Toolkit rely on this jointManager to function
Inheritance
MonoBehaviour
Constructors
GRPLJointManager
public GRPLJointManager()
Methods
EnableHandCollisions
public void EnableHandCollisions(RhinoxHand hand)
Arguments
Type | Name | Description |
---|---|---|
RhinoxHand | hand | Hand to enable collisions on. |
Summary
This method enables collisions for the hand specified by the RhinoxHand parameter. It internally calls the method SetHandCollisions with a true value for the state parameter and the specified RhinoxHand.
DisableHandCollisions
public void DisableHandCollisions(RhinoxHand hand)
Arguments
Type | Name | Description |
---|---|---|
RhinoxHand | hand | Hand to disable collisions on. |
Summary
This method enables collisions for the hand specified by the RhinoxHand parameter. It internally calls the method SetHandCollisions with a false value for the state parameter and the specified RhinoxHand.
EnableHandCollisionsAfterDelay
public void EnableHandCollisionsAfterDelay(RhinoxHand hand)
Arguments
Type | Name | Description |
---|---|---|
RhinoxHand | hand |
DisableHandCollisionsAfterDelay
public void DisableHandCollisionsAfterDelay(RhinoxHand hand)
Arguments
Type | Name | Description |
---|---|---|
RhinoxHand | hand |
SetHandCollisions
public void SetHandCollisions(bool state, RhinoxHand hand)
Arguments
Type | Name | Description |
---|---|---|
bool | state | |
RhinoxHand | hand |
TryGetJointsFromHand
public bool TryGetJointsFromHand(RhinoxHand rhinoxHand, out List<RhinoxJoint> jointList)
Arguments
Type | Name | Description |
---|---|---|
RhinoxHand | rhinoxHand | |
out List <RhinoxJoint > | jointList |
TryGetJointFromHandById
public bool TryGetJointFromHandById(XRHandJointID jointID, RhinoxHand rhinoxHand, out RhinoxJoint joint)
Arguments
Type | Name | Description |
---|---|---|
XRHandJointID | jointID | |
RhinoxHand | rhinoxHand | |
out RhinoxJoint | joint |
TryGetFingerBend
public bool TryGetFingerBend(RhinoxHand hand, RhinoxFinger finger, out float bendValue, bool remap)
Arguments
Type | Name | Description |
---|---|---|
RhinoxHand | hand | |
RhinoxFinger | finger | |
out float | bendValue | |
bool | remap |
GetJointsFromBothHand
public ICollection<RhinoxJoint> GetJointsFromBothHand(XRHandJointID jointID)
Arguments
Type | Name | Description |
---|---|---|
XRHandJointID | jointID | The desired joint ID |
Summary
Gets all joints with XRHandJointID “jointID” from both hands.
Returns
An ICollection holding all the RhinoxJoints corresponding with jointID
Properties
IsLeftHandTracked
public bool IsLeftHandTracked { get; private set; }
Summary
A boolean variable that indicates if the left hand is being tracked.
IsRightHandTracked
public bool IsRightHandTracked { get; private set; }
Summary
A boolean variable that indicates if the right hand is being tracked.
AreJointsInitialised
public bool AreJointsInitialised { get; private set; }
Summary
A boolean variable that indicates if the joints are initialized.
JointCollisionsEnabled
public bool JointCollisionsEnabled { get; set; }
Summary
A boolean property that gets or sets the value of _jointCollisionsEnabled. When this value is set, it also sets the collisions of the hands with the joint capsules.
LeftHandCapsules
public RhinoxJointCapsule LeftHandCapsules { get; }
Summary
An array of RhinoxJointCapsule objects that represent the joint capsules of the left hand.
RightHandCapsules
public RhinoxJointCapsule RightHandCapsules { get; }
Summary
An array of RhinoxJointCapsule objects that represent the joint capsules of the right hand.
LeftHandParentObj
public GameObject LeftHandParentObj { get; }
Summary
A GameObject variable that represents the parent object of the left hand.
LeftHandSocket
public GameObject LeftHandSocket { get; }
Summary
A GameObject variable that represents the socket used to attach objects to the left hand.
RightHandParentObj
public GameObject RightHandParentObj { get; }
Summary
A GameObject variable that represents the parent object of the right hand.
RightHandSocket
public GameObject RightHandSocket { get; }
Summary
A GameObject variable that represents the socket used to attach objects to the right hand.
Events
GlobalInitialized
public static event Action<GRPLJointManager> GlobalInitialized
Summary
A static event that is triggered when the GRPLJointManager is initialized globally, which passes itself as a parameter.
TrackingAcquired
public event Action<RhinoxHand> TrackingAcquired
Summary
An event that is triggered when tracking is acquired for a hand.
TrackingLost
public event Action<RhinoxHand> TrackingLost
Summary
An event that is triggered when tracking is lost for a hand.
OnHandsUpdated
public event Action<RhinoxHand> OnHandsUpdated
Summary
An event that is triggered when a hand is updated.
OnJointCapsulesInitialized
public event Action<RhinoxHand> OnJointCapsulesInitialized
Summary
An event that is triggered when the joint capsules are initialized.
Initialized
private event Action Initialized
Generated with ModularDoc