Пример #1
0
        public MyCuboid CreateTransformed(ref Matrix worldMatrix)
        {
            Vector3[] vertices = new Vector3[8];
            int       index    = 0;

            foreach (Vector3 vector in this.Vertices)
            {
                vertices[index] = Vector3.Transform(vector, (Matrix)worldMatrix);
                index++;
            }
            MyCuboid cuboid = new MyCuboid();

            cuboid.CreateFromVertices(vertices);
            return(cuboid);
        }
Пример #2
0
        public MyCuboid CreateTransformed(ref Matrix worldMatrix)
        {
            Vector3[] vertices = new Vector3[8];

            int i = 0;

            foreach (Vector3 vertex in Vertices)
            {
                vertices[i] = Vector3.Transform(vertex, worldMatrix);
                i++;
            }

            MyCuboid transformedCuboid = new MyCuboid();

            transformedCuboid.CreateFromVertices(vertices);
            return(transformedCuboid);
        }
Пример #3
0
        public MyCuboid CreateTransformed(ref Matrix worldMatrix)
        {
            Vector3[] vertices = new Vector3[8];

            int i = 0;
            foreach (Vector3 vertex in Vertices)
            {
                vertices[i] = Vector3.Transform(vertex, worldMatrix);
                i++;
            }

            MyCuboid transformedCuboid = new MyCuboid();
            transformedCuboid.CreateFromVertices(vertices);
            return transformedCuboid;
        }