Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: ConvexShape rendering differences: clockwise vs. counter-clockwise  (Read 1714 times)

0 Members and 1 Guest are viewing this topic.

Chiller

  • Newbie
  • *
  • Posts: 4
    • View Profile
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]
« Last Edit: February 23, 2013, 02:24:19 pm by Chiller »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
AW: ConvexShape rendering differences: clockwise vs. counter-clockwise
« Reply #1 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: AW: ConvexShape rendering differences: clockwise vs. counter-clockwise
« Reply #2 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?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: ConvexShape rendering differences: clockwise vs. counter-clockwise
« Reply #3 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.
Laurent Gomila - SFML developer

Chiller

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: ConvexShape rendering differences: clockwise vs. counter-clockwise
« Reply #4 on: February 23, 2013, 03:43:58 pm »
Great! Thanks, everyone.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: ConvexShape rendering differences: clockwise vs. counter-clockwise
« Reply #5 on: February 23, 2013, 03:55:23 pm »
Done ;)

Thanks for your feedback.
Laurent Gomila - SFML developer