Beispiel #1
0
        public void Pack()
        {
            float minX = 0;
            float minY = 0;
            float minZ = 0;
            foreach (Face face in Faces)
            {
                foreach (Vertex vertex in face.Vertices)
                {
                    if (Math.Abs(vertex.X) > minX)
                        minX = Math.Abs(vertex.X);
                    if (Math.Abs(vertex.Y) > minY)
                        minY = Math.Abs(vertex.Y);
                    if (Math.Abs(vertex.Z) > minZ)
                        minZ = Math.Abs(vertex.Z);
                }
            }

            Min = new Vertex(minX, minY, minZ);
        }
Beispiel #2
0
 public Vertex(Vertex position)
 {
     X = position.X;
     Y = position.Y;
     Z = position.Z;
 }