Results 1 to 15 of 15

Thread: [RESOLVED] Classes hierarchy

Threaded View

  1. #1

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Resolved [RESOLVED] Classes hierarchy

    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.
    Last edited by krtxmrtz; Jun 19th, 2009 at 09:59 AM.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width