Hi,

 

Ok, take a windows RECT structure:

typedef struct _RECT {

  LONG left;

  LONG top;

  LONG right;

  LONG bottom;

} RECT, *PRECT;

The remarks then state:

By convention, the right and bottom edges of the rectangle are normally considered exclusive. In other words, the pixel whose coordinates are ( right, bottom ) lies immediately outside of the rectangle. For example, when RECT is passed to the FillRect  function, the rectangle is filled up to, but not including, the right column and bottom row of pixels.

How can I gain the same behaviour when doing equals, overlaps etc.?

Any help appreciated.

Cheers

Sean.

 

From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Barend Gehrels
Sent: 26 January 2014 21:49
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] making a geometry half closed

 

Hi Sean,

Sean Farrow wrote On 26-1-2014 14:44:

Hi,

 

From what I understand any boost geometry is fully closed. Is there a way of making a geometry half closed, such that the bottom row is not included?

I’m needing to do this with a Box2D$Values.

Any help appreciated.


No, this is not really implemented. Which problem do you have in mind? For example a "touch" relationship where two geometries touch each other, would this differ if they touch the upper row instead of the lower row?

The within-algorithm (for point-in-box) considers a point within if it is completely inside. That can be finetuned by supplying a strategy which considers bottom-row / right row.

Regard, Barend