Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    RayPolygon ? Why not RayTriangle

    SDK Help
    0
    6
    449
    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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 26/10/2005 at 16:20, xxxxxxxx wrote:

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

      ---------
      Hello all,

      i read in the forum that all geometry are triangulate before before rendering.
      I need to know the vertex coordinate of a polygon hit by ray inside a SimpleIllumModel take from Sdk.

      i noticed that      
      LONG     polyid = 0;
      RayObject *myop = vd->ID_to_Obj(vd->lhit, &polyid;);
      polyid is the # of triangle in the scene.. i tried tihs.
      and i see the RayPolygon have a,b,c and d...
      Why d? Does the Raypolygon are not all triangle?

      How i can get the real the vertex in global coordinate of my polygon?

      Sorry for bad english in the question.

      Thanks in advance
      Renato T.

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 26/10/2005 at 17:32, xxxxxxxx wrote:

        I got the correct vertex:

        Vector V;
             LONG a,b,c;
             LONG polyid = 0;
             RayObject *myop = sd->ID_to_Obj(sd->lhit, &polyid;);

        RayPolygon     *vadr     = myop->vadr;
             Vector          *padr     = myop->padr;

        a = vadr[polyid].a;
             b = vadr[polyid].b;
             c = vadr[polyid].c;
                Vertex1=padr[a]; ........

        My question is:
        is guaranted that "a" for rayobject is the same "a" of Polyobject?

        Thanks
        Renato T.

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 27/10/2005 at 06:46, xxxxxxxx wrote:

          plugincafe' is closed?

          cheers
          Renato T.

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 27/10/2005 at 08:21, xxxxxxxx wrote:

            No, it's not closed. Relevant passage from the docs: "Depending on the nature of your query, an answer can be made quickly or perhaps take several days."
            Regarding the original question, it looks like the point indices coincide, but to be sure I've asked the developers for confirmation.

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 27/10/2005 at 08:32, xxxxxxxx wrote:

              Ok Thanks Michael.

              Renato T.

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

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 31/10/2005 at 03:00, xxxxxxxx wrote:

                The response from the developers is that usually the points stay the same, and no reordering is done. However you should never rely on this when you access the arrays. At least you should check the counts, so that you don't read beyond the array if the point count would change in some occasion. The same is true for polygons. (One case where the polygons *are* changed is when SPD is enabled, then all polygons are triangulated.)

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