예제 #1
0
파일: Up.cs 프로젝트: WildGenie/actools
            internal Arm(Kn5RenderableDriver _driver, bool isLeft)
            {
                var s = isLeft ? "L" : "R";

                _side = isLeft ? 1f : -1f;

                _clave      = _driver.GetDummyByName($"DRIVER:RIG_Clave_{s}");
                _arm        = _driver.GetDummyByName($"DRIVER:RIG_Arm_{s}");
                _forearm    = _driver.GetDummyByName($"DRIVER:RIG_ForeArm_{s}");
                _forearmEnd = _driver.GetDummyByName($"DRIVER:RIG_ForeArm_END_{s}");
                _hand       = _driver.GetDummyByName($"DRIVER:RIG_HAND_{s}");

                _index = _hand?.GetDummyByName(isLeft ? "DRIVER:HAND_Index1" : "DRIVER:HAND_Index4");
                _thumb = _hand?.GetDummyByName($"DRIVER:HAND_{s}_Thumb3");

                _indexf = new Finger(new[] {
                    new FingerBit(_hand, isLeft ? "DRIVER:HAND_Index1" : "DRIVER:HAND_Index4",
                                  new Vector3(-3f, -5f, _side * -20.5f), new Vector3(-3f, -5f, _side * -67.5f)),
                    new FingerBit(_hand, isLeft ? "DRIVER:HAND_Index2" : "DRIVER:HAND_Index5",
                                  new Vector3(-2.7f, 0.2f, _side * -10.5f), new Vector3(-2.7f, 0.2f, _side * -34f)),
                    new FingerBit(_hand, isLeft ? "DRIVER:HAND_Index3" : "DRIVER:HAND_Index6",
                                  new Vector3(0.5f, -2.2f, _side * -4.5f), new Vector3(0.5f, -2.2f, _side * -32.5f))
                });

                _middle = new Finger(new[] {
                    new FingerBit(_hand, isLeft ? "DRIVER:HAND_Middle1" : "DRIVER:HAND_Middle4",
                                  new Vector3(10f, -1f, _side * -20.5f), new Vector3(10f, -1f, _side * -72.5f)),
                    new FingerBit(_hand, isLeft ? "DRIVER:HAND_Middle2" : "DRIVER:HAND_Middle5",
                                  new Vector3(-2f, 1f, _side * -10.5f), new Vector3(-2f, 1f, _side * -39f)),
                    new FingerBit(_hand, isLeft ? "DRIVER:HAND_Middle3" : "DRIVER:HAND_Middle6",
                                  new Vector3(3.6f, -3.9f, _side * -4.5f), new Vector3(3.6f, -3.9f, _side * -32.5f))
                });

                _ring = new Finger(new[] {
                    new FingerBit(_hand, isLeft ? "DRIVER:HAND_Ring1" : "DRIVER:HAND_Ring4",
                                  new Vector3(11.5f, 5f, _side * -20.5f), new Vector3(11.5f, 5f, _side * -83.5f)),
                    new FingerBit(_hand, isLeft ? "DRIVER:HAND_Ring2" : "DRIVER:HAND_Ring5",
                                  new Vector3(0, 0, _side * -10.5f), new Vector3(0, 0, _side * -41f)),
                    new FingerBit(_hand, isLeft ? "DRIVER:HAND_Ring3" : "DRIVER:HAND_Ring6",
                                  new Vector3(0, 0, _side * -4.5f), new Vector3(0, 0, _side * -32.5f))
                });

                _pinkie = new Finger(new[] {
                    new FingerBit(_hand, isLeft ? "DRIVER:HAND_Pinkie1" : "DRIVER:HAND_Pinkie4",
                                  new Vector3(12.16f, 3.4f, _side * -20.5f), new Vector3(12.16f, 3.4f, _side * -87.5f)),
                    new FingerBit(_hand, isLeft ? "DRIVER:HAND_Pinkie2" : "DRIVER:HAND_Pinkie5",
                                  new Vector3(-2f, 3f, _side * -10.5f), new Vector3(-2f, 3f, _side * -45f)),
                    new FingerBit(_hand, isLeft ? "DRIVER:HAND_Pinkie3" : "DRIVER:HAND_Pinkie6",
                                  new Vector3(-1.1f, -1.9f, _side * -4.5f), new Vector3(-1.1f, -1.9f, _side * -32.5f))
                });

                Init();
            }
예제 #2
0
파일: Up.cs 프로젝트: WildGenie/actools
                public FingerBit(Kn5RenderableList parent, string name, Vector3 relaxedRotation, Vector3 grabbyRotation)
                {
                    Node = parent.GetDummyByName(name);
                    if (Node == null)
                    {
                        return;
                    }

                    _translation     = Node.LocalMatrix.GetTranslationVector();
                    _relaxedRotation = relaxedRotation * MathF.ToRad;
                    _grabbyRotation  = grabbyRotation * MathF.ToRad;
                    _relaxed         = Quaternion.RotationYawPitchRoll(relaxedRotation.X, relaxedRotation.Y, relaxedRotation.Z);
                    _grabby          = Quaternion.RotationYawPitchRoll(grabbyRotation.X, grabbyRotation.Y, grabbyRotation.Z);
                }