예제 #1
0
 public override bool Equals(Object obj)
 {
     //Check for null and compare run-time types.
     if ((obj == null) || !this.GetType().Equals(obj.GetType()))
     {
         return(false);
     }
     else
     {
         FixVec4 fv = (FixVec4)obj;
         return(x == fv.x.raw &&
                y.raw == fv.y.raw &&
                z.raw == fv.z.raw &&
                w.raw == fv.w.raw);
     }
 }
예제 #2
0
 public Matrix4fix(FixVec4 row0, FixVec4 row1, FixVec4 row2, FixVec4 row3)
 {
     m00 = row0.x;
     m01 = row0.y;
     m02 = row0.z;
     m03 = row0.w;
     m10 = row1.x;
     m11 = row1.y;
     m12 = row1.z;
     m13 = row1.w;
     m20 = row2.x;
     m21 = row2.y;
     m22 = row2.z;
     m23 = row2.w;
     m30 = row3.x;
     m31 = row3.y;
     m32 = row3.z;
     m33 = row3.w;
 }
예제 #3
0
        /// <summary>
        /// Creates a 4x4 matrix from the given rows.
        /// </summary>
        /// <param name="row0">00-03.</param>
        /// <param name="row1">10-13.</param>
        /// <param name="row2">20-23.</param>
        /// <param name="row3">30-33.</param>
        public Matrix4x4Fix(FixVec4 row0, FixVec4 row1, FixVec4 row2, FixVec4 row3)
        {
            m11 = row0.x;
            m12 = row0.y;
            m13 = row0.z;
            m14 = row0.w;

            m21 = row1.x;
            m22 = row1.y;
            m23 = row1.z;
            m24 = row1.w;

            m31 = row2.x;
            m32 = row2.y;
            m33 = row2.z;
            m34 = row2.w;

            m41 = row3.x;
            m42 = row3.y;
            m43 = row3.z;
            m44 = row3.w;
        }
예제 #4
0
 public Fix Dot(FixVec4 rhs)
 {
     return(x * rhs.x + y * rhs.y + z * rhs.z + w * rhs.w);
 }