[Paraview] Adding a new vtkCamera
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Mon Aug 8 11:42:44 EDT 2005
For any VTK objects that you need to create on the server-side, be it
RenderServer or DataServer or both, you need to use the ServerManager.
One simply creates a proxy and notifies it of the servers it is to be
instantiated on (vtkSMProxy::SetServers). How to create a proxy? There's
code for that in the GUI,
example: vtkPVProbe::CreateProperties(). Note that for
vtkSMProxyManager::NewProxy to be successful, the proxy interface must
be defined in the ServerManager resource files in
Servers/ServerManager/Resources/*.xml.
Additionally, the proxy interace for your "cave renderer", will have to
support a proxy property with command="SetActiveCaveCamera".
Once that is done, and you have a camera proxy, set the proxy on the
proxyproperty for setting the ActiveCaveCamera, and the VTK objects for the
camera will be set as the CaveCamera on VTK objects for the render(s) on
the server(s).
Utkarsh
Joel Howard Willis Weinberger wrote:
> Thanks a lot for the info.
>
> I do need to create the camera on a separate render server. Do you
> know of any example code of this being done in ParaView? Thanks again.
>
> --Joel
>
> On Tue, 2 Aug 2005, Utkarsh Ayachit wrote:
>
>> Joel,
>>
>> I am not clear where the line
>> "Renderer -> SetActiveCaveCamera(newCamera); " added?
>> You can switch cameras in a render module.
>> refer to vtkSMRenderModuleProxy::CreateVTKObjects(int numObjects).
>> In this case we have only changed the active camera on the client
>> renderer. For this to work, it is essential that the renderer is
>> created on the client as well. If you wanted to change the active
>> camera on the render server as well, you would have to create a
>> camera proxy on the servers and use a proxy property on the renderer
>> proxy to set the active camera.
>>
>> Utkarsh
>>
>> Joel Howard Willis Weinberger wrote:
>>
>>> I recently created a new subclass of vtkCamera (the purpose of which
>>> is to add a head tracking support for 3d interactive environments)
>>> to add to a custom render module. I created several vtk test suites
>>> in which the new camera functioned very well.
>>>
>>> However, when I added the line
>>>
>>> Renderer -> SetActiveCaveCamera(newCamera);
>>>
>>> where newCamera is an instance of the vtkCamera subclass I get the
>>> error:
>>> "p0_1260: p4_error: interrupt SIGSEGV: 11"
>>>
>>>
>>> Does anyone have any idea of how to add a new vtkCamera to a render
>>> module? It seems like you should be able to arbitrarily switch
>>> cameras in your render module. Thanks.
>>>
>>> --Joel Weinberger, Brown University
>>> _______________________________________________
>>> ParaView mailing list
>>> ParaView at paraview.org
>>> http://www.paraview.org/mailman/listinfo/paraview
>>>
>>
>
More information about the ParaView
mailing list