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

    Change Point Order [SOLVED]

    SDK Help
    0
    2
    337
    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 03/02/2017 at 04:26, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R18 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hey,

      I am trying to figure out what exactly Change Point Order command does behind the scenes.
      Does it only switch the order of points in every selected poly clock-wise or counter clock-wise?
      It seems I get different results depending on the selected polys.

      I need to understand the algorithm behind the command because I am trying to compute tangent vectors from uv's and positions and I only ever get correct results if I reorder the points first.

      I would appreciate any insight in this topic.

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

        On 06/02/2017 at 06:57, xxxxxxxx wrote:

        Hi Grosnus, thanks for writing us.

        With reference to your request, although we are not allowed to disclose any algorithm or describe procedures internally used in Cinema the command you're referring doesn't change the order of the points describing a polygon (from CW to CCW or viceversa) but simply changes the sequence the points are representing a polygon
        Consider a triangle namely having points at

        -50,0,50
        0,0,50
        50,0,-50

        and the only polygon describing it using the following indexes representation

        a:0 b:1 c:2

        Running the command once will result in having the polygon/points index representation swapped of one position:

        a:1 b:2 c:0

        whilst running twice will result having the polygon/points index representation swapped of two positions:

        a:2 b:0 c:1

        Running a third time will result in a polygon/points representation equal to the initial set.

        As you can see the index will still refer to CCW order whilst the first value "a" will cycles between 0, 1 and 2.

        Hoping it helps to sort out your doubts, feel free to comment further if something is still unclear.

        Best, R.

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