SFML community forums

Help => Graphics => Topic started by: Chiller on February 23, 2013, 02:18:07 pm

Title: ConvexShape rendering differences: clockwise vs. counter-clockwise
Post by: Chiller on February 23, 2013, 02:18:07 pm
See the image. The triangle is a ConvexShape, the top side of the rectangle which can be seen is a RectangleShape, included for reference (in fact, the rectangle's x coordinates were set to be the same as those of the lower side of the triangle). There was a noticeable difference in size when the vertex coordinates were specified in clockwise order versus counter-clockwise order. All coordinates were integers.

For completeness - these were transparent shapes and what can be seen are the outlines.

[attachment deleted by admin]
Title: AW: ConvexShape rendering differences: clockwise vs. counter-clockwise
Post by: eXpl0it3r on February 23, 2013, 02:53:56 pm
Do you get the reversed effect if you set the outline witdh to -1?

Also you might want to actually ask a question, instead of just wriring statements.
Title: Re: AW: ConvexShape rendering differences: clockwise vs. counter-clockwise
Post by: Nexus on February 23, 2013, 03:17:09 pm
Also you might want to actually ask a question, instead of just wriring statements.
In my opinion, it's pretty clear what he wants to say: Intuitively, the orientation should not have an effect on the polygon size. Is this behavior intended or a bug? In the former case, is it documented?
Title: Re: ConvexShape rendering differences: clockwise vs. counter-clockwise
Post by: Laurent on February 23, 2013, 03:37:10 pm
Hum... the extrusion direction of the outline may depend on the order. This should be fixed, yes.
Title: Re: ConvexShape rendering differences: clockwise vs. counter-clockwise
Post by: Chiller on February 23, 2013, 03:43:58 pm
Great! Thanks, everyone.
Title: Re: ConvexShape rendering differences: clockwise vs. counter-clockwise
Post by: Laurent on February 23, 2013, 03:55:23 pm
Done ;)

Thanks for your feedback.