Visual Helper

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

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?

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

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

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