Ejemplo n.º 1
0
        // Creates a rotation matrix.
        public static SDKMatrix4x4 Rotate(SDKQuaternion value)
        {
            float qx = value.x;
            float qy = value.y;
            float qz = value.z;
            float qw = value.w;

            return(new SDKMatrix4x4
            {
                m00 = 1.0f - 2.0f * qy * qy - 2.0f * qz * qz,
                m01 = 2.0f * qx * qy - 2.0f * qz * qw,
                m02 = 2.0f * qx * qz + 2.0f * qy * qw,
                m03 = 0.0f,
                m10 = 2.0f * qx * qy + 2.0f * qz * qw,
                m11 = 1.0f - 2.0f * qx * qx - 2.0f * qz * qz,
                m12 = 2.0f * qy * qz - 2.0f * qx * qw,
                m13 = 0.0f,
                m20 = 2.0f * qx * qz - 2.0f * qy * qw,
                m21 = 2.0f * qy * qz + 2.0f * qx * qw,
                m22 = 1.0f - 2.0f * qx * qx - 2.0f * qy * qy,
                m23 = 0.0f,
                m30 = 0.0f,
                m31 = 0.0f,
                m32 = 0.0f,
                m33 = 1.0f
            });
        }
Ejemplo n.º 2
0
 public static SDKMatrix4x4 TRS(SDKVector3 translation, SDKQuaternion rotation, SDKVector3 scale)
 {
     return(Translate(translation) * Rotate(rotation) * Scale(scale));
 }
Ejemplo n.º 3
0
 public static SDKMatrix4x4 Scale(SDKVector3 value) => default;                                               // 0x000000018180BB70-0x000000018180BC10
 public static SDKMatrix4x4 TRS(SDKVector3 translation, SDKQuaternion rotation, SDKVector3 scale) => default; // 0x000000018180BC10-0x000000018180C770
Ejemplo n.º 4
0
 public static SDKMatrix4x4 Translate(SDKVector3 value) => default;                                           // 0x000000018180C770-0x000000018180C820
 public static SDKMatrix4x4 Rotate(SDKQuaternion value) => default;                                           // 0x000000018180B9A0-0x000000018180BB70