[vtkusers] Question and possible redesign
obara
obara at simmetrix.com
Mon Apr 16 15:46:31 EDT 2001
Hi Folks,
I am in the process of trying to implement a constraint between two (or
more) cameras. The idea is when one camera's orientation is changed -
then all other cameras constrained to it would get also updated. This
can be very useful when wanting to view 2 different results but with the
same gaze point (for example if you wanted to give the user some feedback
as to the orientation of the universe).
There are 2 ways this can be implemented:
1. Have the vtkInteractorStyles enforce the constraints so when it
changes one camera it also updated all other cameras that are constrained
- I have done a sample implementation of this. One of the drawbacks is
that FindPokedRenderer is not virtual and, in my implementation, there
was a master camera and a slave camera. Since I could not override
FindPokedRenderer sometimes events were going to the slave camera (whose
render window was a subset of the main window) instead of to the master
camera. In addition the InteractorStyle will track a light w/r to the
camera if one exists w/r to the current renderer - if the light is indeed
constrained by the camera then it too needs to be updated if the camera
is changed via a constraint - This relation between the camera and lights
seems to be imposed by the InteractorStyle and not explicitly modeled -
is this correct?
2. Add the constraint to vtkCamera object itself (which seems to be the
correct way of doing this)
What I would like to do is to propose (and implement) the following if it
makes sense:
1. A Camera can have a light associated with it which means when the
camera is updated so is the light source. - In addition the implicit
light-camera relationship in vtkInteractorStyle would be removed
2. Add a constrain relationship mechanism to vtkCamera.
Finally - quick question - Can the Renderer be told not to use a
background color so you can see what it behind it? The reason I ask is
that I want to "float" a Renderer on top of another and I don't want to
fill in the background to the "floating Renderer".
Look forward to hearing your comments.
Bob
Robert M. O'Bara
Senior Software Engineer
Simmetrix Inc.
1223 Peoples Ave.
Troy, NY 12180
Lab: (518) 276-2867
Main Office: (518) 276-2729
More information about the vtkusers
mailing list