Menu

vtkCamera

Help
aperture3
2006-10-31
2013-04-25
  • aperture3

    aperture3 - 2006-10-31

    I have been writing custom interactor code and have used vtk observers in a .net application to attempt to customize camera movement.
    I have achieved everything I need except acquiring a vtkCamera. When I call GetCurrentRenderer from the vtkInteractorStyle of the vtkFormsWindowControl I get an application exception

    "An unhandled exception of type 'System.ApplicationException' occurred in vtkCommonDotNet.dll

    Additional information: Could not create class vtkRenderer from null native pointer.".

    Does anyone know how to access the renderer of the vtkFormsWindowControl?

     
    • jedi@

      jedi@ - 2006-10-31

      Hi,

      did you first add a "new" renderer to the vtkFormsWindowControl.GetRenderWindow?

      vtkFormsWindowControl.GetRenderWindow.AddRenderer(new vtkRenderer)

       
      • aperture3

        aperture3 - 2006-10-31

        I have done this and thank you for reminding me. I was attempting to extract the camera through the vtkInteractorStyle. This apparently does not work but I will attempt to get the renderer from the render window rather than the interactor.
        Thank you for kick starting my brain. I will post my results after testing.

        Ryan

         

Log in to post a comment.