Ejemplo n.º 1
0
        public static CameraSpacePoint Norm(this CameraSpacePoint cur)
        {
            float mag = cur.Magnitude();

            return(new CameraSpacePoint()
            {
                X = cur.X / mag, Y = cur.Y / mag, Z = cur.Z / mag
            });
        }
Ejemplo n.º 2
0
        public static float AngleBetween(this CameraSpacePoint cur, CameraSpacePoint other)
        {
            float curMag = cur.Magnitude();
            float othMag = other.Magnitude();

            float angle = (float)(Math.Atan(cur.DotProduct(other) / (curMag * othMag)) * 180 / Math.PI);

            return(angle);
        }