[vtkusers] rotating vtkCamera
Marc Cotran
marc at cotran.ca
Thu Apr 19 12:41:36 EDT 2007
Hi other Mark :)
Try calling vtkCamera::OrthogonalizeViewUp() after each call to
Elevation(). Although the VTK docs say:
"Recompute the ViewUp vector to force it to be perpendicular to
camera->focalpoint vector. Unless you are going to use Yaw or Azimuth on
the camera, there is no need to do this."
I would try it anyway :)
Marc
Mark Wyszomierski wrote:
> Hi Marc,
>
> Elevation seems to work - kind of. I keep calling elevate with the
> amount of degrees I want to change by:
>
> for (int i = 0; i < 64; i++) {
> pCamera->Elevation(360.0 / 64.0);
> }
>
> It works fine through about a 90 degree rotation - but then I start
> getting debug error messages about the view up having to be
> recalculated, and the volume starts spinning around out of control!
>
> Thanks,
> Mark
>
> On 4/19/07, Marc Cotran <marc at cotran.ca> wrote:
>> Hi there,
>>
>> Try vtkCamera::Elevation() and Azimuth() - both methods take an angle
>> parameter. Sounds like you are looking for Elevation(). Pitch(), on the
>> other hand, changes the focal point, not the camera position.
>>
>> hth
>>
>> Marc
>>
>>
>> Mark Wyszomierski wrote:
>> > Hi,
>> >
>> > Is there a method of vtkCamera to rotate about the focal point?
>> > Something like:
>> >
>> > for (int i = 0; i < 64; i++) {
>> > double dPitch = i * (360.0 / 64);
>> > pCamera->Pitch(dPitch);
>> > // render..
>> > }
>> >
>> > The effect I'm looking for is to have the camera orbit around its
>> > focal point in the direction of its view up.
>> >
>> > Thanks,
>> > Mark
>> > _______________________________________________
>> > This is the private VTK discussion list. Please keep messages
>> > on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
More information about the vtkusers
mailing list