[vtkusers] camera follower in 3D

Richard Frank rickfrank at me.com
Fri Mar 25 19:40:41 EDT 2016


Hi,

Has anyone successfully created a widget or other object that stays facing the camera in 3D?

I've been trying to get the boxwidget to stay with one side facing the camera and I've come close - by computing a change of basis matrix after computing the camera position, direction of projection, etc. and creating a rotation matrix from the basis column vectors.

When I have the PlusX face of the box widget facing the camera, and move the camera with the trackball interactor, the face of the widget stays facing (seems like it is standing still) but the size/scale of the box gets smaller as I rotate by sliding the mouse from right to left. 

It seems that I need to compensate for some scaling of the rotation matrix but I'm not sure exactly what. I'm putting together a small example if someone wants to take a look at it.

Thanks

Rick

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160325/dab1fb01/attachment.html>


More information about the vtkusers mailing list