Questions about CPolygons
On 23/10/2015 at 21:43, xxxxxxxx wrote:
Cinema 4D Version: R15
Platform: Mac ;
Language(s) : C++ ;
Are the members of a CPolygon struct (a, b, c, and d) always guaranteed to be in sequence (ie, a -> b -> c -> d for a quadrangle), and/or guaranteed to have a specific winding order (clockwise or counterclockwise)?
On 24/10/2015 at 06:28, xxxxxxxx wrote:
A CPolygon is a structure of point indices a, b, c, d, in that very order. Whether the polygon indices have
a clockwise or counterclockwise order is not the important question, since that depends on the side you
view the polygon from. The polygon normal is actually defined as the side of the polygon from which you
look at it so that its points a, b, c (and eventually d, for a quadrangle) are arranged clockwise.
On 24/10/2015 at 18:21, xxxxxxxx wrote:
Thanks for the reply.
So the following is always true (for a single quadrangle polygon)?:
A: has neighbours B and D
B: has neighbours A and C
C: has neighbours B and D
D: has neighbours A and C
Like, B will never have a direct connection to D (for a quadrangle), correct?
On 25/10/2015 at 06:37, xxxxxxxx wrote:
If C and D are not the same then we have quadrangle that may look like this one:
On 27/10/2015 at 15:23, xxxxxxxx wrote:
Note that if C and D are the same (vertex index), then the polygon is a triangle: a->b->c/d. If the vertex index is updated for either c or d, you probably want to do the same for the other to maintain as a triangle.