Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Questions about CPolygons

    SDK Help
    0
    5
    412
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      On 23/10/2015 at 21:43, xxxxxxxx wrote:

      User Information:
      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)?

      -CMPX

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        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.

        -N

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          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
          😄 has neighbours B and D
          😧 has neighbours A and C

          Like, B will never have a direct connection to D (for a quadrangle), correct?

          -CMPX

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            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:
            http://www.mathsteacher.com.au/year7/ch09_polygons/04_quad/Image11005.gif

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post