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
    • Recent
    • Tags
    • Users
    • Login

    Visual Helper

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 447 Views
    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 Offline
      Helper
      last edited by

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

      On 26/03/2011 at 07:12, xxxxxxxx wrote:

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

      ---------
      Hey everyone,

      I have a visual helper in the form of the circle that is drawn to the screen.  I would like the helper to remain the same size no matter how the user zooms in or out..  kind of like the rotation, translation, and scale manipulators..  I do not want my visual helper to change size when the user zooms in or out.  Could someone help me with how to accomplish this?

      Thanks so much.

      Shawn

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

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

        On 26/03/2011 at 07:48, xxxxxxxx wrote:

        Hello Shawn,

        Maybe some code how you get your circle in the screen?

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

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

          On 26/03/2011 at 08:00, xxxxxxxx wrote:

          Hi Toni,,

          Here's how i get the circle to the screen.

            
          Matrix m = op->GetMg();  
            
          LReal size = 6;  
              
            m.v1 *= 150;  
            m.v2 *= 150;  
            m.v3 *= 150;  
            
          bd->SetMatrix_Matrix(op, Matrix());  
            
            Matrix xRotationMatrix;  
            xRotationMatrix.off = m.off;  
            xRotationMatrix.v1 = m.v3 * .50;  
            xRotationMatrix.v2 = m.v2 * .50;  
            
          bd->DrawCircle(xRotationMatrix);  
            
          

          Thanks toni...   by setting the matrix to a specific size i am able to keep the circle one size but this doesn't account for zooming in and out this is just relative to the object..  🙂   I would like it to be relative to the camera..   🙂

          Thanks

          Shawn

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

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

            On 26/03/2011 at 09:54, xxxxxxxx wrote:

            And along with this question,  can a GeRayCOllider be used to check for an intersection with a virtually drawn line?  For example I want to use DrawLine() and draw a line,  then when the mouse is over that line, I want it to change color..   is this done with GeRayCOllider?

            Thanks,

            Shawn

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

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

              On 31/03/2011 at 05:54, xxxxxxxx wrote:

              You need to draw the circle in screen space. Use SetMatrix_Screen() instead of SetMatrix_Matrix().

              As for checking intersections, you can't use GeRayCollider(). I am not sure how it is done though. I have to think about it.

              cheers,
              Matthias

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