Пример #1
0
 public static Float3 operator *(Float3 _V, Float3x3 _M)
 {
     Float3 ret = new Float3(
         Float3.Dot(_V, _M.Column[0]),
         Float3.Dot(_V, _M.Column[1]),
         Float3.Dot(_V, _M.Column[2]));
     return ret;
 }
Пример #2
0
 public static Float3 Normalize(Float3 _A)
 {
     return _A / _A.Length();
 }
Пример #3
0
 //Methods
 public static float Dot(Float3 _A, Float3 _B)
 {
     return _A.X * _B.X + _A.Y * _B.Y + _A.Z * _B.Z;
 }
Пример #4
0
 public Float3x3(Float3 _X, Float3 _Y, Float3 _T)
 {
     X = _X;
     Y = _Y;
     T = _T;
 }
Пример #5
0
 public static Float4x4 Translate(Float3 _Translation)
 {
     return new Float4x4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, _Translation.X, _Translation.Y, _Translation.Z, 1);
 }
Пример #6
0
 public static Float4x4 Scale(Float3 _Scale)
 {
     return new Float4x4(_Scale.X, 0, 0, 0, 0, _Scale.Y, 0, 0, 0, 0, _Scale.Z, 0, 0, 0, 0, 1);
 }
Пример #7
0
 public Float3x3(float _XX, float _XY, float _XZ, float _YX, float _YY, float _YZ, float _TX, float _TY, float _TZ)
 {
     X = new Float3(_XX, _XY, _XZ);
     Y = new Float3(_YX, _YY, _YZ);
     T = new Float3(_TX, _TY, _TZ);
 }
Пример #8
0
 public Float3x3()
 {
     X = new Float3(1, 0, 0); Y = new Float3(0, 1, 0); T = new Float3(0, 0, 1);
 }