コード例 #1
0
        private float[] FixChildQuaternion(float[] q, double angle)
        {
            BabylonQuaternion qFix               = new BabylonQuaternion((float)Math.Sin(angle / 2), 0, 0, (float)Math.Cos(angle / 2));
            BabylonQuaternion quaternion         = new BabylonQuaternion(q[0], q[1], q[2], q[3]);
            BabylonQuaternion rotationQuaternion = qFix.MultiplyWith(quaternion);

            return(rotationQuaternion.ToArray());
        }
コード例 #2
0
        private BabylonQuaternion FixChildQuaternion(BabylonNode node, double angle)
        {
            BabylonQuaternion qFix               = new BabylonQuaternion((float)Math.Sin(angle / 2), 0, 0, (float)Math.Cos(angle / 2));
            BabylonQuaternion quaternion         = new BabylonQuaternion(node.rotationQuaternion[0], node.rotationQuaternion[1], node.rotationQuaternion[2], node.rotationQuaternion[3]);
            BabylonQuaternion rotationQuaternion = qFix.MultiplyWith(quaternion);

            return(rotationQuaternion);
        }