C# Class Kinect.AvatarController

Inheritance: UnityEngine.MonoBehaviour
Show file Open project: BrainProject/UnityTemp

Protected Properties

Property Type Description
bodyRoot UnityEngine.Transform
bodyRootPosition Vector3
boneIndex2JointMap KinectInterop.JointType>.Dictionary
boneIndex2MirrorJointMap KinectInterop.JointType>.Dictionary
bones UnityEngine.Transform[]
initialPosition Vector3
initialRotation UnityEngine.Quaternion
initialRotations UnityEngine.Quaternion[]
isRigidBody bool
jointMap2boneIndex int>.Dictionary
kinectManager KinectManager
mirrorJointMap2boneIndex int>.Dictionary
offsetCalibrated bool
offsetNodePos Vector3
offsetNodeRot UnityEngine.Quaternion
specIndex2JointMap List>.Dictionary
specIndex2MirrorJointMap List>.Dictionary
xOffset float

Public Methods

Method Description
Awake ( ) : void
GetBoneIndexByJoint ( KinectInterop joint, bool bMirrored ) : int
GetBoneTransform ( int index ) : Transform
GetBoneTransformCount ( ) : int
ResetToInitialPosition ( ) : void
SuccessfulCalibration ( System.Int64 userId ) : void
UpdateAvatar ( System.Int64 UserID ) : void

Protected Methods

Method Description
GetInitialRotations ( ) : void
Kinect2AvatarPos ( Vector3 jointPosition, bool bMoveVertically ) : Vector3
Kinect2AvatarRot ( Quaternion jointRotation, int boneIndex ) : Quaternion
MapBones ( ) : void
MoveAvatar ( System.Int64 UserID ) : void
SetModelArmsInTpose ( ) : void
TransformBone ( System.Int64 userId, KinectInterop joint, int boneIndex, bool flip ) : void
TransformSpecialBone ( System.Int64 userId, KinectInterop joint, KinectInterop jointParent, int boneIndex, Vector3 baseDir, bool flip ) : void

Method Details

Awake() public method

public Awake ( ) : void
return void

GetBoneIndexByJoint() public method

public GetBoneIndexByJoint ( KinectInterop joint, bool bMirrored ) : int
joint KinectInterop
bMirrored bool
return int

GetBoneTransform() public method

public GetBoneTransform ( int index ) : Transform
index int
return UnityEngine.Transform

GetBoneTransformCount() public method

public GetBoneTransformCount ( ) : int
return int

GetInitialRotations() protected method

protected GetInitialRotations ( ) : void
return void

Kinect2AvatarPos() protected method

protected Kinect2AvatarPos ( Vector3 jointPosition, bool bMoveVertically ) : Vector3
jointPosition Vector3
bMoveVertically bool
return Vector3

Kinect2AvatarRot() protected method

protected Kinect2AvatarRot ( Quaternion jointRotation, int boneIndex ) : Quaternion
jointRotation UnityEngine.Quaternion
boneIndex int
return UnityEngine.Quaternion

MapBones() protected method

protected MapBones ( ) : void
return void

MoveAvatar() protected method

protected MoveAvatar ( System.Int64 UserID ) : void
UserID System.Int64
return void

ResetToInitialPosition() public method

public ResetToInitialPosition ( ) : void
return void

SetModelArmsInTpose() protected method

protected SetModelArmsInTpose ( ) : void
return void

SuccessfulCalibration() public method

public SuccessfulCalibration ( System.Int64 userId ) : void
userId System.Int64
return void

TransformBone() protected method

protected TransformBone ( System.Int64 userId, KinectInterop joint, int boneIndex, bool flip ) : void
userId System.Int64
joint KinectInterop
boneIndex int
flip bool
return void

TransformSpecialBone() protected method

protected TransformSpecialBone ( System.Int64 userId, KinectInterop joint, KinectInterop jointParent, int boneIndex, Vector3 baseDir, bool flip ) : void
userId System.Int64
joint KinectInterop
jointParent KinectInterop
boneIndex int
baseDir Vector3
flip bool
return void

UpdateAvatar() public method

public UpdateAvatar ( System.Int64 UserID ) : void
UserID System.Int64
return void

Property Details

bodyRoot protected property

protected Transform,UnityEngine bodyRoot
return UnityEngine.Transform

bodyRootPosition protected property

protected Vector3 bodyRootPosition
return Vector3

boneIndex2JointMap protected property

protected Dictionary boneIndex2JointMap
return KinectInterop.JointType>.Dictionary

boneIndex2MirrorJointMap protected property

protected Dictionary boneIndex2MirrorJointMap
return KinectInterop.JointType>.Dictionary

bones protected property

protected Transform[],UnityEngine bones
return UnityEngine.Transform[]

initialPosition protected property

protected Vector3 initialPosition
return Vector3

initialRotation protected property

protected Quaternion,UnityEngine initialRotation
return UnityEngine.Quaternion

initialRotations protected property

protected Quaternion[],UnityEngine initialRotations
return UnityEngine.Quaternion[]

isRigidBody protected property

protected bool isRigidBody
return bool

jointMap2boneIndex protected property

protected Dictionary jointMap2boneIndex
return int>.Dictionary

kinectManager protected property

protected KinectManager,Kinect kinectManager
return KinectManager

mirrorJointMap2boneIndex protected property

protected Dictionary mirrorJointMap2boneIndex
return int>.Dictionary

offsetCalibrated protected property

protected bool offsetCalibrated
return bool

offsetNodePos protected property

protected Vector3 offsetNodePos
return Vector3

offsetNodeRot protected property

protected Quaternion,UnityEngine offsetNodeRot
return UnityEngine.Quaternion

specIndex2JointMap protected property

protected Dictionary> specIndex2JointMap
return List>.Dictionary

specIndex2MirrorJointMap protected property

protected Dictionary> specIndex2MirrorJointMap
return List>.Dictionary

xOffset protected property

protected float xOffset
return float