Exemple #1
0
        public static Vector Transform(Vector vector, Matrix world, Matrix view)
        {
            var transformedVector = Vector.Transform(vector, world);

            transformedVector = Vector.Transform(transformedVector, view);
            return(transformedVector);
        }
Exemple #2
0
        public static Vector Translate(Vector vector, Matrix projection, float width, float height)
        {
            var translated = Vector.Transform(vector, projection);

            translated.X = (translated.X * width) + (width / 2);
            translated.Y = (translated.Y * height) + (height / 2);
            translated.Z = 0;

            return(translated);
        }