Пример #1
0
 public static void Multiply(ref btVector3 v, ref btMatrix3x3 m, out btVector3 result)
 {
     result.X = m.tdotx(ref v);
     result.Y = m.tdoty(ref v);
     result.Z = m.tdotz(ref v);
     result.W = 0;
 }
Пример #2
0
 /*public static btMatrix3x3 operator *(btMatrix3x3 m1, btMatrix3x3 m2)
 {
     return new btMatrix3x3(
         m2.tdotx(m1.el0), m2.tdoty(m1.el0), m2.tdotz(m1.el0),
         m2.tdotx(m1.el1), m2.tdoty(m1.el1), m2.tdotz(m1.el1),
         m2.tdotx(m1.el2), m2.tdoty(m1.el2), m2.tdotz(m1.el2));
 }*/
 public static void Multiply(ref btMatrix3x3 m1, ref btMatrix3x3 m2, out btMatrix3x3 result)
 {
     result.el0.X = m2.tdotx(ref m1.el0);
     result.el0.Y = m2.tdoty(ref m1.el0);
     result.el0.Z = m2.tdotz(ref m1.el0);
     result.el0.W = 0;
     result.el1.X = m2.tdotx(ref m1.el1);
     result.el1.Y = m2.tdoty(ref m1.el1);
     result.el1.Z = m2.tdotz(ref m1.el1);
     result.el1.W = 0;
     result.el2.X = m2.tdotx(ref m1.el2);
     result.el2.Y = m2.tdoty(ref m1.el2);
     result.el2.Z = m2.tdotz(ref m1.el2);
     result.el2.W = 0;
 }