View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009738VTK(No Category)public2009-10-20 04:202016-08-12 09:55
Reporteredice 
Assigned ToKitware Robot 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0009738: vtkInteractorStyleTerrain confused by FlyTo()
DescriptionSet the interactor style to Terrain.
Set the camera like so:
  ren->GetActiveCamera()->SetPosition(1,1,0);
  ren->GetActiveCamera()->SetFocalPoint(0,0,0);
  ren->GetActiveCamera()->SetViewUp(0,0,1);

View a model.

Confirm that you cannot rotate the model all the way past the 'up' axis, the most you can go is to look directly down onto the model. That is a terrible description but I hope you get the gist.

Angle the model so you look at it from above, say from 45 degrees.
Press 'f' to fly to a point in the model.

The camera's Up is now no longer 0,0,1. This screws up Terrain, now if you move the mouse up and down, you will go "over the top" of the model, rather than stopping at looking directly down on the model.

To "fix" this, I have had to do the following:


class CameraUp_Callback : public vtkCommand
{
public:
   virtual void Execute(vtkObject * caller, unsigned long, void*)
   {
      vtkRenderer * ren = vtkRenderer::SafeDownCast(caller);
      vtkCamera * camera = ren->GetActiveCamera();
      if (camera)
      {
         double * view = camera->GetViewUp();
         if (view[0] != 0 and view[1] != 0 and view[2] != 1)
            camera->SetViewUp(0,0,1);
      }
   }
};



ren->AddObserver(vtkCommand::ResetCameraClippingRangeEvent, new CameraUp_Callback);
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0037109)
Kitware Robot (administrator)
2016-08-12 09:55

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2009-10-20 04:20 edice New Issue
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2016-08-12 09:55 Kitware Robot Note Added: 0037109
2016-08-12 09:55 Kitware Robot Status expired => closed
2016-08-12 09:55 Kitware Robot Resolution open => moved
2016-08-12 09:55 Kitware Robot Assigned To => Kitware Robot


Copyright © 2000 - 2018 MantisBT Team