Boost logo

Geometry :

Subject: [geometry] How to register a custom rectangle with additional angle information
From: Holger (holger.gaus_at_[hidden])
Date: 2012-10-31 06:38:30


Hi community,

I like to use boost::geometry with custom 2D geometry types. Registration of
points, segments, polygons work so far well by use of the boost registration
macros. Now I stuck by trying to register a custom rectangle with an
additional angle information.

My custom rectangle looks something like this:

class rectangleCustom
{
private:
    int m_Left;
    int m_Top;
    int m_Width;
    int m_Height;
    double m_Phi; // This member forces me to use the bg::ring registration
                       // and not the easy going rectangle registration :-(
...
}

>From my point of view I have to use the bg::ring registration and store the
4+1 point representing an rectangle and map all the points dependent of the
custom angle information.
OK, that's my theory so far but to implement this I do not have enough
knowledge in meta programming etc.
All the examples at
http://www.boost.org/doc/libs/1_51_0/libs/geometry/example/
<http://www.boost.org/doc/libs/1_51_0/libs/geometry/example/>
did not give me the right hint or I just missed the point.
What I found to do is specialization of:
1. coordinate_type
2. coordinate_system
3. dimension metafunctions
4. access structure

I stuck on 'dimension metafunctions' and the 'access structure'!
Can somebody point me to the right direction? Any help is highly
appreciated.

Holger

--
View this message in context: http://boost-geometry.203548.n3.nabble.com/How-to-register-a-custom-rectangle-with-additional-angle-information-tp4025135.html
Sent from the Boost Geometry mailing list archive at Nabble.com.

Geometry list run by mateusz at loskot.net