adapting legacy geometry model to boost.geometry concepts

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

adapting legacy geometry model to boost.geometry concepts

Xavier Ventura Simon | GAF AG

Hi,

 

I would like to know if it is possible to adapt my geometry objects to the Boost.Geometry concepts without major changes in the old code. My classes look like that (simplified):

 

class CgPoint

{

public:

       // Coordinates

       double x;

       double y;

};

 

class Polygon

{

public:

       CVectorBlock*        pHoles;

protected:

       int          npkt;                                          // number of points

       CgPoint*     punkt;                                         // point array

};

 

class CVectorBlock

{

protected:

       std::vector< Polygon *>    vektor;                           // all the elements in the block

};

 

The point class CgPoint is straight forward but I begin having problems when I try to define the ring concept cause Polygon behaves like both, a ring and a polygon, and I don’t have encapsulated in a class the concept of exterior ring. Any idea?

 

Thanks,

XaVS


Xavier Ventura Simon
GAFAG

GAF AG • Arnulfstr. 199 • 80634 Munich • Germany
Phone: +49 89 121528 872 • Fax: +49 89 121528 79
[hidden email] http://www.gaf.de

CEO: Dr. Peter Volk, Chairman of the supervisory board: Massimo Comparini
Place of business: Munich, Magistrate's court Munich HRB 140 509

WARNING: This message contains confidential and/or proprietary information which may be subject to privilege or immunity and which is intended for the use of its addressee only. Should you receive this message in error, you are kindly requested to inform the sender and to definitively remove it from any paper or electronic format. Any other use of this e-mail is strictly forbidden. Thank you in advance for your cooperation.



_______________________________________________
Geometry mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/geometry
Loading...