I want to create a class to perform some operations with polygons. A polygon consists of one or more closed contours and each of these can have 3 or more vertices, each with 2 coordinates, X and Y.
I have been working for a while with 1-contour polygons and I have a polygon class plus a vertex class (from a demo I found in this forum). The latter was used inside the polygon class as a collection. But the problem is how to go about it when there are more contours. Should I make an intermediate 'contour' class? Can someone help me to figure out the basic layout? I have used classes very little and almost always using pre-defined templates from other people, so I'm a little confused. Doing it with UDTs was easier.




Reply With Quote