[vtkusers] 3D, constant view size, billboard object?
BURRELL Benjamin
Benjamin.Burrell at Tenix.com
Sun Mar 21 23:12:26 EST 2004
Hi Jeff,
I was wondering if you could describe a bit further with code, I think I kind of understand what your getting at but I am not sure how to go about implementing it in VTK.
Thanks,
Benjamin Burrell
-----Original Message-----
From: Jeff Lee [mailto:jeff at cdnorthamerica.com]
Sent: Saturday, March 20, 2004 3:26 AM
To: BURRELL Benjamin
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] 3D, constant view size, billboard object?
Hi,
In a nutshell, you need to add an observer to your renderwindow
StartRender event. In your callback, you
1. Convert a billboard world point to display
2. nudge the display point by a couple of pixels
3. convert the nudged point back to world
4. the distance between the original point and the point from (3) will
give you a radius by which you can scale your billboard object before it
renders.
if this is too sketchy, i could probably cobble up some code... let me
know.
-Jeff
BURRELL Benjamin wrote:
>Hi,
>
>I am wondering if anyone has any suggestions on how to solve the following:
>What I require is 3D object (which might be some simple line drawn symbols or a 3D model) that always appears the same size on screen, even when I move the camera close to it. I need this to happen in real-time, eg. I am probably going to use the vtkInteractorStyleTrackballCamera interactor and use the mouse. This interactor 'dollies' the camera (moves the camera closer and further away) compared to the std. interactor style which zooms in and out.
>I am guessing I will need to overwrite the dolly callback function but I am not sure how to do it, and what to implement to get the desired result of having the 3D object stay the same size on screen.
>
>I might also want the 3D model to actually be a billboard object, eg. face the camera all the time with a 2D image.
>Does anyone have a suggested vtkObject to do this with. It will also need to stay the same size on the screen no matter how close/far away the camera gets.
>
>Thank you for your help.
>
>Regards,
>Benjamin Burrell
>
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>
>
More information about the vtkusers
mailing list