예제 #1
0
 public Float4x4(Float4[] rows)
     : this(rows[0].x, rows[0].y, rows[0].z, rows[0].w,
          rows[1].x, rows[1].y, rows[1].z, rows[1].w,
          rows[2].x, rows[2].y, rows[2].z, rows[2].w,
          rows[3].x, rows[3].y, rows[3].z, rows[4].w)
 {
 }
예제 #2
0
        public Float3 transformPoint(Float3 p)
        {
            Float4 tP = this.mul(new Float4(p, 1));

            return(tP.xyz * (1f / tP.w));
        }
예제 #3
0
 public Float4 mul(Float4 v)
 {
     return new Float4(v.dot(getColumn(0)),
                       v.dot(getColumn(1)),
                       v.dot(getColumn(2)),
                       v.dot(getColumn(3))
         );
 }
예제 #4
0
 public float dot(Float4 b)
 {
     return this.x * b.x + this.y * b.y + this.z * b.z + this.w * b.w;
 }