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); }
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); }
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; }