示例#1
0
 public MovableModel(Model model, Matrix4 transform)
     : base(transform)
 {
     m_model = model;
     m_transforms = new Matrix[m_model.Bones.Count];
     m_model.CopyAbsoluteBoneTransformsTo (m_transforms);
 }
示例#2
0
 public CastableModel(Model model, Matrix4 transform)
     : base(model, transform)
 {
 }
示例#3
0
 // this' = this * M; right-multiply matrix semantics
 // Ignore translation when transforming a normal
 public void transformNormal(Matrix4 m)
 {
     float tx = X * m.Right.X + Y * m.Up.X + Z * m.Backward.X;
     float ty = X * m.Right.Y + Y * m.Up.Y + Z * m.Backward.Y;
     float tz = X * m.Right.Z + Y * m.Up.Z + Z * m.Backward.Z;
     X = tx;
     Y = ty;
     Z = tz;
 }
示例#4
0
 // this' = this * M^(-1); right-multiply matrix semantics
 public void transformByInverse(Matrix4 m)
 {
     m.invert ();
     transform (m);
 }
示例#5
0
 //public Matrix3 (OpenTK.Matrix4 m)
 //    : this (m.Right, m.Up, m.Forward)
 //{
 //}
 // Normalize the height of "m" regardless of "ensureOrthonormal"
 public Matrix3(Matrix4 m, bool ensureOrthonormal)
     : this(m.Right, m.Up, m.Forward, true)
 {
 }
示例#6
0
 public MovableQuat(Matrix4 transform)
 {
     m_rotation = transform.Rotation.getQuaternion ();
     m_position = transform.Translation;
     m_scale = new Vector3 (1.0f);
 }
示例#7
0
 public static void invert(ref Matrix4 m, out Matrix4 inverse)
 {
     Matrix4 copy = m;
     copy.invert ();
     inverse = copy;
 }
示例#8
0
 static Matrix4()
 {
     ms_identity = new Matrix4 (true);
 }