PDA

View Full Version : Rendering gizmo (3d handler)...



yooyo
06-24-2005, 06:58 AM
Im writing some 3d editing application and I need to draw 3d handler for translating, rotation and scaling selected object just like in Maya.

It is not problem to render it, but I like it to be always same size, independent on camera zoom or object scale.

Is there any trick with modelview or projection matrices?

yooyo

zed
06-24-2005, 11:41 AM
i suppose u could change the matrices but its prolly simplier using the following info to keep things at the same scale regardless of distance


// ----S---- |
// \ / | a S/2
// \ _ / | D tan - = ---
// \/A\/ | 2 D
// \ / |
// V |
// A = fov, D = distance, S = size

yooyo
06-24-2005, 02:19 PM
Thanx a lot zed.. It works!

yooyo