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

    TraceGeometry: check for hitting same obj

    SDK Help
    0
    4
    304
    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 19/04/2004 at 15:20, xxxxxxxx wrote:

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

      ---------
      Ok, I've the following situation: Trace Geometry starts a surface of a closed body, and I need to find this volume's surface in ray direction.

      My question is:
      How to ignore any objects in between? Basically I need a method to check if the current hit is on the same surface as my very first lhit (starting point).
      Alternatively a check if the surface it using the same material could be valuable...
      ...or a method to ignore any other object.

      Thanks for any tips and insight!

      Kabe

      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 19/04/2004 at 16:05, xxxxxxxx wrote:

        Sounds like you should be able to use ID_to_Obj() on the hits to see if they are on the same objects. If they aren't, simply continue tracing.

        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 19/04/2004 at 23:45, xxxxxxxx wrote:

          Thanks for pointing me to the right direction, that was what I was searching for.

          Is it ok to compare the resultig RayObject*, or should I convert to the Object Number using Obj_to_Num() ?

          Thanks

          Kabe

          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 22/04/2004 at 18:02, xxxxxxxx wrote:

            I think that it's safe to check the RayObjects, at least when you're just in one thread. (As you would be if calling TraceGeometry() in your own loop.)

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