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

    RayCollider / Change object data

    SDK Help
    0
    3
    333
    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 25/10/2003 at 12:54, xxxxxxxx wrote:

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

      ---------
      Hiya
      Im using the RayCollider to intersect the mouse cursor position with the object to find the polygon that the mouse is over, using a tool plugin.
      I have globally declared a RayCollider and called the RayCollider::Init(obj,TRUE) method on my tools Init method.
      I have it all working except my tool changes the vertices of active object, and the RayCollider doesn't take into account the new changes.
      I can fix this my adding a rc::Init(obj,TRUE); in the GetCursorInfo method, but the rc:Init method slows down the plugin somewhat, especially with high dense meshes.
      How can I tell the RayCollider to use the new vertice changes of the object without re-initializes it everytime?
      Thanks

      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/2003 at 01:05, xxxxxxxx wrote:

        I don't think that would be possible. RayCollider::Init() builds a possibly non-trivial space partition cache of the object that isn't easy to upgrade. If you need a higher performance you'll have to build your own algorithm that supports this. For a small number of rays you could first see if a brute force check against all polygons would be faster. (I.e. if you're only doing one ray before you change the vertices it might be faster not to build the cache and just check each polygon.)

        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 28/10/2003 at 01:14, xxxxxxxx wrote:

          Thats what i feared 😞
          Thanks anyway

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