void Start() { asfReader = new ASFReader(ASFPath); amcReader = new AMCReader(AMCPath); AcclaimToKinectConverter cvt = new AcclaimToKinectConverter(); acclaimHandler = new AcclaimHandler(asfReader, amcReader, cvt); jointObjs = new Dictionary <string, GameObject>(); foreach (var item in acclaimHandler.skeletonJointDict) { GameObject go = GameObject.CreatePrimitive(PrimitiveType.Sphere); go.transform.localScale = new Vector3(scale, scale, scale); go.name = item.Key; jointObjs.Add(item.Key, go); } /* * objs = new GameObject[AcclaimToKinectConverter.AcclaimKinectMap.Count]; * for (int i = 0; i < objs.Length; i++) * { * objs[i] = GameObject.CreatePrimitive(PrimitiveType.Sphere); * objs[i].transform.localScale = new Vector3(scale, scale, scale); * objs[i].name = AcclaimToKinectConverter.AcclaimKinectMap[i][0]; * } * * joints = new Vector3[objs.Length]; */ /* * initUp = Vector3.zero; * float upperS = 0.3f; * upperCube = GameObject.CreatePrimitive(PrimitiveType.Cube); * upperCube.transform.localScale = new Vector3(upperS, upperS, upperS); * upperCube.transform.position = initUp; * * lowerCube = GameObject.CreatePrimitive(PrimitiveType.Cube); * lowerCube.transform.localScale = upperCube.transform.localScale; * float yT = initUp.y + 1.2f*upperS; * initLow = new Vector3(initUp.x, -yT, initUp.z); * lowerCube.transform.position = initLow; */ }
void Start() { skeleton = new CharacterSkeleton(humanoid); state = new int[BODYCOUNT * JOINTCOUNT]; for (int i = 0; i < state.Length; i++) { state[i] = CharacterSkeleton.TrackingState_Tracked; } asfReader = new ASFReader(ASFPath); amcReader = new AMCReader(AMCPath); AcclaimToKinectConverter cvt = new AcclaimToKinectConverter(); acclaimHandler = new AcclaimHandler(asfReader, amcReader, cvt); }