Exemple #1
0
        public static V Transform <V> (this Mat4 mat, V point)
            where V : struct, IVec <V, float>
        {
            var v = new Vec4(1f);

            for (int i = 0; i < point.Dimensions; i++)
            {
                v [i] = point [i];
            }
            v = mat * v;
            return(Vec.FromArray <V, float> (v.X, v.Y, v.Z, v.W));
        }
Exemple #2
0
 public V ToVector <V> () where V : struct, IVec <V, float>
 {
     return(Vec.FromArray <V, float> (Uvec.X, Uvec.Y, Uvec.Z, W));
 }