Scale Drawing according to distance

On 22/06/2013 at 05:36, xxxxxxxx wrote:

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

I want to reproduce the behavior of the move axis that appears always the same size in the

viewport. I draw a matrix into the viewport using DrawLine() three times:

Is there a float value I can multiply the length of those lines with so they appear always the same
size on the screen?


On 22/06/2013 at 06:00, xxxxxxxx wrote:

I ran into the same problem in python some time ago and i solved it by using the baseview w/h 
ratio and size as a reference. However the c4d axis gizmo scaling is more complex than it might 
appear at the first glance. It does relate to the BaseView frame ratio and also introduces some 
sort of capping so that extreme width/height ratios are filtered.

ps: the 'convert unit in space xyz to 1 px' methods  in baseview can be handy for that task.

On 23/06/2013 at 02:59, xxxxxxxx wrote:

Thanks for your answer. I'll play with this and report back. 🙂