MRHand
MRHand
Class describing the MRHand object representing the UX of the hand object for MR interactions.
Kind: global class
Properties
Name | Type | Description |
---|---|---|
pinch | boolean |
Indicates if the hand is in a pinch gesture. |
jointPhysicsBodies | object |
Physics bodies associated with the hand joints. |
identityPosition | THREE.Vector3 |
A reference position for the hand. |
tempJointPosition | THREE.Vector3 |
Temporary storage for a joint’s position. |
tempJointOrientation | THREE.Quaternion |
Temporary storage for a joint’s orientation. |
controllerModelFactory | XRControllerModelFactory |
Factory for creating controller models. |
handModelFactory | XRHandModelFactory |
Factory for creating hand models. |
mesh | THREE.Mesh |
The 3D mesh representing the hand. |
controller | THREE.Object3D |
The controller object. |
grip | THREE.Object3D |
The grip associated with the controller. |
hand | THREE.Object3D |
The 3D object representing the hand. |
model | THREE.Object3D |
The model of the hand. |
- MRHand
- .MRHand
- .initPhysicsBodies()
- .update()
- .pinchMoved()
- .updatePhysicsBodies()
- .setMesh()
- .onSelect(event)
- .getJointOrientation(jointName) ⇒
THREE.Quaternion
- .getJointPosition(jointName) ⇒
THREE.Vector3
- .getCursorPosition() ⇒
number
mrHand.MRHand
Kind: instance class of MRHand
new exports.MRHand(handedness, scene)
Constructor for the MRHand class object. Setups up all attributes for MRHand including physics, mouse/cursor information, hand tracking and state, and model
Param | Type | Description |
---|---|---|
handedness | object |
enum for the left`` or right` hand. |
scene | object |
the threejs scene object with information from the MRApp. |
mrHand.initPhysicsBodies()
Initializes the physics bodies that the hand represents. Useful for collision detection and UX interactions in MR space.
Kind: instance method of MRHand
mrHand.update()
Update function for the Hand object. Updates the physics bodies and checks whether a pinch has happened or is in progress in any way.
Kind: instance method of MRHand
mrHand.pinchMoved()
If a pinch happens, updates the MR cursor position while sending out an event that movement has occured from this hand.
Kind: instance method of MRHand
mrHand.updatePhysicsBodies()
Update function for the physics associated with this hand. Runs for every joint in the system and moves all elements of the hand model.
Kind: instance method of MRHand
mrHand.setMesh()
Handles the setMesh callback.
Kind: instance method of MRHand
mrHand.onSelect(event)
Handles the onSelect event
Kind: instance method of MRHand
Param | Type | Description |
---|---|---|
event | event |
the on pinch event object |
THREE.Quaternion
mrHand.getJointOrientation(jointName) ⇒ Gets the joint orientation of the named joint in the hand.
Kind: instance method of MRHand
Returns: THREE.Quaternion
- - the quaternion representation or the joint orientation.
Param | Type | Description |
---|---|---|
jointName | string |
the string name of the joint whose information is requested. |
THREE.Vector3
mrHand.getJointPosition(jointName) ⇒ Gets the joint position of the named joint in the hand.
Kind: instance method of MRHand
Returns: THREE.Vector3
- - the position representation or the joint orientation.
Param | Type | Description |
---|---|---|
jointName | string |
the string name of the joint whose information is requested. |
number
mrHand.getCursorPosition() ⇒ Gets the expected cursor position of this hand based on the index finger and thumb’s tip positions.
Kind: instance method of MRHand
Returns: number
- - the resolved position of the cursor.