예제 #1
0
        private void ApplyRotationOffset(NiMatrix33 matrix, float x, float y, NiMatrix33 result)
        {
            if (x == 0.0f && y == 0.0f)
            {
                if (!result.Equals(matrix))
                {
                    result.CopyFrom(matrix);
                }
                return;
            }

            var rot = this.TempResult.Transform.Rotation;

            rot.Identity(1.0f);

            if (y != 0.0f)
            {
                rot.RotateX(y, rot);
            }

            if (x != 0.0f)
            {
                rot.RotateZ(-x, rot);
            }

            matrix.Multiply(rot, result);
        }
예제 #2
0
 internal static void CopyFrom(this NiMatrix33 pt, NiMatrix33 other)
 {
     Memory.Copy(other.Address, pt.Address, 0x24);
 }