XRSPACE Developer Console

API - XRUtil

Contents

Enums

  • public enum XRIKJoint

Description Avatar bone.

Pelvis

Mapping to Unity avatar bone: HumanBodyBones.Hips.

Spine

Mapping to Unity avatar bone: HumanBodyBones.Spine.

Spine1

Mapping to Unity avatar bone: HumanBodyBones.Chest.

Spine2

Mapping to Unity avatar bone: HumanBodyBones.UpperChest.

Neck

Mapping to Unity avatar bone: HumanBodyBones.Neck.

Head

Mapping to Unity avatar bone: HumanBodyBones.Head.

LeftClavicle

Mapping to Unity avatar bone: HumanBodyBones.LeftShoulder.

LeftUpperArm

Mapping to Unity avatar bone: HumanBodyBones.LeftUpperArm.

LeftLowerArm

Mapping to Unity avatar bone: HumanBodyBones.LeftLowerArm.

LeftWrist

Mapping to Unity avatar bone: HumanBodyBones.LeftHand.

RightClavicle

Mapping to Unity avatar bone: HumanBodyBones.RightShoulder.

RightUpperArm

Mapping to Unity avatar bone: HumanBodyBones.RightUpperArm.

RightLowerArm

Mapping to Unity avatar bone: HumanBodyBones.RightLowerArm.

RightWrist

Mapping to Unity avatar bone: HumanBodyBones.RightHand.

LeftThigh

Mapping to Unity avatar bone: HumanBodyBones.LeftUpperLeg.

LeftCalf

Mapping to Unity avatar bone: HumanBodyBones.LeftLowerLeg.

LeftFoot

Mapping to Unity avatar bone: HumanBodyBones.LeftFoot.

RightThigh

Mapping to Unity avatar bone: HumanBodyBones.RightUpperLeg.

RightCalf

Mapping to Unity avatar bone: HumanBodyBones.RightLowerLeg.

RightFoot

Mapping to Unity avatar bone: HumanBodyBones.RightFoot.


  • public enum IKTarget

Description Avatar bone target.

Head

LeftArm

RightArm

LeftLeg

RightLeg

Pelvis


  • public enum HandlerMode

Description Handler mode definition for Handler.

Auto

Auto change handler mode by system.

Controller_3Dof

Restrict handler mode to controller 3DoF.

Controller_6Dof

Restrict handler mode to controller 6DoF.

Hand

Restrict handler mode to hand.


  • public enum SensorAccuracyLevel

Description Tracker sensor accuracy level.

Low

Medium

High


  • public enum XRActionGesture

Description ActionGesture definition present by Handler.

None

Default value.

IndexDown_Outward

Index_Outward change to Fist_Outward.

IndexUp_Outward

Fist_Outward change to Index_Outward.

Click_Outward

IndexDown_Outward onece and IndexUp_Outward will trigger it.

Grab_Outward

Open_Outward change to Fist_Outward.

Release_Outward

Fist_Outward change to Open_Outward.

IndexDown_Inward

Index_Inward change to Fist_Outward.

IndexUp_Inward

Fist_Inward change to Index_Inward.

Click_Inward

IndexDown_Inward onece and IndexUp_Inward will trigger it.

Grab_Inward

Open_Inward change to Fist_Inward.

Release_Inward

Fist_Inward change to Open_Inward.

PointerDown

Index change to Fist.

PointerUp

Fist chande to Index or Open.


  • public enum XRBodyBase

Description Part of body’s Morion definition. It is the million digit part of motion.

RIGHT_FOOT

1

LEFT_FOOT

2

RIGHT_HAND

3

LEFT_HAND

4

FOOT

5

HAND

6

BODY

7


  • public enum XRBodyOrientation

Description Motion orientation definition. It is the thousand digit part of motion.

IN_SITU

1

FRONT_SIDE

2

BACK_SIDE

3

LEFT

4

RIGHT

5

FRONT_LEFT_SIDE

6

FRONT_RIGHT_SIDE

7

BACK_LEFT_SIDE

8

BACK_RIGHT_SIDE

9


  • public enum XRControllerButton

Description Button definition on controller.

None

0x00000000

Default value.

Action

0x00000002

Button on the top of controller with circle mark.

Grab

0x00000004

Button on the bottom of controller.

TrackPadPress

0x00000008

Button on the top front side of controller pressed.

TrackPadTouch

0x00000010

Button on the top front side of controller touched.

Trigger

0x00000060

Button on the front of controller.


  • public enum XRDeviceType

Description Device type definition for Handler, Headset and Tracker.

HEADSET

-2

Device on head with screen and camera.

HANDLER_RIGHT

9

Device on right hand or controller.

HANDLER_LEFT

10

Device on left hand or controller.

RIGHT_FOOT

100

Device on right foot tracker.

LEFT_FOOT

101

Device on left foot tracker.

RIGHT_WRIST

102

Device on right wrist tracker.

LEFT_WRIST

103

Device on left wrist tracker.

RIGHT_ARM

104

Device on right arm tracker.

LEFT_ARM

105

Device on left arm tracker.


  • public enum XRHandlerDeviceType

Description Restricted device type definition (only have handler right/left).

HANDLER_RIGHT

9

Device on right hand or controller.

HANDLER_LEFT

10

Device on left hand or controller.


  • public enum XRHandlerGesture

Description Gesture definition present by Handler.

None

-1

Default value.

Open_Outward

0

All finger stretched. (Outward)

Index_Outward

1

Index finger stretched, others bending. (Outward)

Fist_Outward

2

All finger bending. (Outward)

IndexTriggered

3

Index finger stretched and forward, others bending.

Thumb

4

Thumb stretched, others bending.

Ok

5

Thumb and index finger bending together, others stretched.

ThumbTriggered

6

Thumb stretched, others bending.

Gun

7

Thumb and index finger stretched, others bending.

Open_Inward

100

All finger stretched. (Inward)

Index_Inward

101

Index finger stretched, others bending. (Inward)

Fist_Inward

102

All finger bending. (Inward)

ShakeHand

200

All finger stretched forward.


  • public enum XRHandlerType

Description Handler type definition for Handler.

None

0

Default value.

Hand

1

Hand is front of camera without controller.

Controller6Dof

2

Hand is front of camera with controller.

Controller3Dof

4

Manipulate controller outside camera’s field of view.


  • public enum XRPosture

Description Motion pose definition. It is the digit part of motion.

KICK

1

TREAD

2

LIFT_UP

3

PUT_DOWN

4

TIPTOE_ROTATION

5

HELL_ROTATION

6

TIPTOE_DRAWING_CIRCLE

7

JUMP

8

SHAKING_FOOT

9

SWIPE_FOOT

10

CROSSED_KNEE

11

DEEP_CROSSED_LEG

12

SHALLOW_CROSSED_LEG

13

SIT

14

OBLIQUE_FRONT

15

RUN

100

WALK

101

OPEN_FOOT_JUMP

102

Structs

  • public struct IkNode

Description Description of avatar bone.

public Quaternion rotation

public Vector3 position


  • public struct IkTargetWeight

Description Weight of avatar target.

public float positionWeight Weight of avatar position.

public float rotationWeight Weight of avatar rotation.


  • public struct XRBodyPosture

Description The motion struct.

public int Id Id presents the motion definition number. It is mixed by XRPosture, XRBodyOrientation and XRBodyBase.

../_images/XRBodyPosture_Id_Description.png

public int Probability Probability present the motion’s posibility.