Commit ff7de8de authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

ENH: More work for comparative visualization. pqRenderView can now handle the

case when the view module is a comparative vis view.

No longer exposing "InteractorStyle" instead one should directly change the
camera manipulators. This makes life easier for comparative vis.
parent 9f0faec5
......@@ -236,8 +236,6 @@ ADD_LIBRARY(pqCore
pqReaderFactory.h
pqRenderView.cxx
pqRenderView.h
pqRenderViewProxy.cxx
pqRenderViewProxy.h
pqRepresentation.cxx
pqRepresentation.h
pqSMAdaptor.cxx
......
......@@ -295,6 +295,7 @@ pqView* pqObjectBuilder::createView(const QString& type,
if(type == pqRenderView::renderViewType())
{
proxy = server->newRenderView();
// proxy = pxm->NewProxy("newviews", "ComparativeRenderView");
}
else
{
......
This diff is collapsed.
......@@ -57,7 +57,7 @@ public:
// \c parent:- QObject parent.
pqRenderView( const QString& group,
const QString& name,
vtkSMRenderViewProxy* renModule,
vtkSMViewProxy* renModule,
pqServer* server,
QObject* parent=NULL);
......@@ -235,6 +235,9 @@ private slots:
/// Called when undo stack changes. We fires appropriate
/// undo signals as required by pqView.
void onUndoStackChanged();
/// Called when the layout on the comparative vis changes.
void onComparativeVisLayoutChanged();
protected:
bool eventFilter(QObject* caller, QEvent* e);
......
/*=========================================================================
Program: ParaView
Module: pqRenderViewProxy.cxx
Copyright (c) 2005,2006 Sandia Corporation, Kitware Inc.
All rights reserved.
ParaView is a free software; you can redistribute it and/or modify it
under the terms of the ParaView license version 1.1.
See License_v1.1.txt for the full ParaView license.
A copy of this license can be obtained by contacting
Kitware Inc.
28 Corporate Drive
Clifton Park, NY 12065
USA
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=========================================================================*/
#include "pqRenderViewProxy.h"
#include "vtkObjectFactory.h"
#include "vtkSMRenderViewProxy.h"
#include "pqRenderView.h"
vtkCxxRevisionMacro(pqRenderViewProxy, "1.3");
vtkStandardNewMacro(pqRenderViewProxy);
//-----------------------------------------------------------------------------
pqRenderViewProxy::pqRenderViewProxy()
{
this->RenderView = 0;
}
//-----------------------------------------------------------------------------
pqRenderViewProxy::~pqRenderViewProxy()
{
this->RenderView = 0;
}
//-----------------------------------------------------------------------------
void pqRenderViewProxy::EventuallyRender()
{
if (this->RenderView)
{
// EventuallyRender is never called during interactive render,
// this should try to collapse render requests and all,
// for now simply StillRender.
this->RenderView->getRenderViewProxy()->StillRender();
}
}
//-----------------------------------------------------------------------------
void pqRenderViewProxy::Render()
{
if (this->RenderView)
{
// pqRenderViewProxy::Render() is only called for interactive render.
// Hence...
// render LOD's
this->RenderView->getRenderViewProxy()->InteractiveRender();
}
}
//-----------------------------------------------------------------------------
vtkRenderWindow* pqRenderViewProxy::GetRenderWindow()
{
if (!this->RenderView)
{
return 0;
}
return this->RenderView->getRenderViewProxy()->GetRenderWindow();
}
//-----------------------------------------------------------------------------
void pqRenderViewProxy::setRenderView(pqRenderView* rm)
{
this->RenderView = rm;
}
//-----------------------------------------------------------------------------
void pqRenderViewProxy::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
os << indent << "RenderView: " << this->RenderView << endl;
}
/*=========================================================================
Program: ParaView
Module: pqRenderViewProxy.h
Copyright (c) 2005,2006 Sandia Corporation, Kitware Inc.
All rights reserved.
ParaView is a free software; you can redistribute it and/or modify it
under the terms of the ParaView license version 1.1.
See License_v1.1.txt for the full ParaView license.
A copy of this license can be obtained by contacting
Kitware Inc.
28 Corporate Drive
Clifton Park, NY 12065
USA
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=========================================================================*/
#ifndef _pqRenderViewProxy_h
#define _pqRenderViewProxy_h
#include "pqCoreExport.h"
#include "vtkPVRenderViewProxy.h"
class pqRenderView;
/// Integrates the PVS render window with the Qt window
class PQCORE_EXPORT pqRenderViewProxy : public vtkPVRenderViewProxy
{
public:
static pqRenderViewProxy* New();
vtkTypeRevisionMacro(pqRenderViewProxy,vtkPVRenderViewProxy);
void PrintSelf(ostream& os, vtkIndent indent);
// Implemeting API from vtkPVRenderViewProxy.
virtual void Render();
virtual void EventuallyRender();
virtual vtkRenderWindow* GetRenderWindow();
// Set the pqRenderView.
void setRenderView(pqRenderView*);
// Get the pqRenderView.
pqRenderView* getRenderView()
{return this->RenderView;}
protected:
pqRenderViewProxy();
~pqRenderViewProxy();
pqRenderView* RenderView;
private:
pqRenderViewProxy(const pqRenderViewProxy&); // Not implemented
void operator=(const pqRenderViewProxy&); // Not implemented
};
#endif
......@@ -35,7 +35,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "pqServer.h"
#include "pqXMLUtil.h"
#include "QVTKWidget.h"
#include "vtkObject.h"
#include "vtkCommand.h"
#include "vtkEventQtSlotConnect.h"
......
......@@ -84,7 +84,12 @@ pqProxy* pqStandardServerManagerModelInterface::createPQProxy(
if (proxy->IsA("vtkSMRenderViewProxy"))
{
return new pqRenderView(group, name,
vtkSMRenderViewProxy::SafeDownCast(proxy), server, 0);
vtkSMViewProxy::SafeDownCast(proxy), server, 0);
}
if (xml_type == "ComparativeRenderView")
{
return new pqRenderView(group, name,
vtkSMViewProxy::SafeDownCast(proxy), server, 0);
}
}
else if (group == "sources")
......
......@@ -113,6 +113,8 @@ SET(Kit_SRCS
vtkSMRepresentationStrategy.cxx
vtkSMScalarBarActorProxy.cxx
vtkSMScalarBarWidgetRepresentationProxy.cxx
vtkSMComparativeViewProxy.cxx
vtkSMRenderViewHelper.cxx
vtkSMSelectionHelper.cxx
# vtkSMSelectionProxy.cxx
vtkSMSelectionRepresentationProxy.cxx
......@@ -179,23 +181,29 @@ SET( ServerManager_SRCS
SET_SOURCE_FILES_PROPERTIES(
vtkSMAnimationCueManipulatorProxy.cxx
vtkSMAnimationSceneWriter.cxx
vtkSMClientServerRenderSyncManagerHelper.cxx
vtkSMDataRepresentationProxy.cxx
vtkSMDomain.cxx
vtkSMInformationHelper.cxx
vtkSMLink.cxx
vtkSMMultiProcessRenderView.cxx
vtkSMMultiProcessRenderView.cxx
vtkSMProxyManagerReviver.cxx
vtkSMStateLoaderBase.cxx
vtkSMUndoElement.cxx
vtkSMVectorProperty.cxx
vtkSMDataRepresentationProxy.cxx
vtkSMRepresentationProxy.cxx
vtkSMRepresentationStrategy.cxx
vtkSMStateLoaderBase.cxx
vtkSMStateVersionControllerBase.cxx
vtkSMMultiProcessRenderView.cxx
vtkSMClientServerRenderSyncManagerHelper.cxx
vtkSMStateVersionControllerBase.cxx
vtkSMUndoElement.cxx
vtkSMVectorProperty.cxx
ABSTRACT
)
SET_SOURCE_FILES_PROPERTIES(
vtkSMRenderViewHelper.cxx
WRAP_EXCLUDE)
INCLUDE_DIRECTORIES(
${VTK_INCLUDE_DIR}
${TCL_INCLUDE_PATH}
......
......@@ -2632,6 +2632,15 @@
<BooleanDomain name="bool" />
</IntVectorProperty>
<Property
name="ResetCamera"
command="ResetCamera"
update_self="1">
<Documentation>
Called to reset the camera using current data bounts.
</Documentation>
</Property>
<!--
Some common subproxies that are not affected by the type of render
view. Note the absence of such essential subproxies as RenderWindow,
......@@ -2702,11 +2711,19 @@
proxygroup="interactors">
</Proxy>
<ExposedProperties>
<Property name="InteractorStyle" />
<Property name="CenterOfRotation" />
</ExposedProperties>
</SubProxy>
<SubProxy>
<Proxy name="InteractorStyle" proxyname="InteractorStyle"
proxygroup="interactorstyles">
</Proxy>
<ExposedProperties>
<Property name="CameraManipulators" />
</ExposedProperties>
</SubProxy>
<!-- End of RenderViewBase -->
</Proxy>
......@@ -3003,6 +3020,72 @@
<!-- End of ClientServerRenderView-->
</ClientServerRenderViewProxy>
<ComparativeViewProxy name="ComparativeRenderView"
base_proxygroup="newviews" base_proxyname="ViewBase">
<Documentation>
The is comparative view comprising of individual "RenderView" proxies
for each panel in the comparative view grid.
</Documentation>
<SubProxy>
<Proxy name="RootView" proxygroup="newviews" proxyname="RenderView">
</Proxy>
<ExposedProperties>
<Property name="LODThreshold" />
<Property name="LODResolution" />
<Property name="UseTriangleStrips" />
<Property name="UseImmediateMode" />
<Property name="RenderInterruptsEnabled" />
<Property name="ResetCamera" />
<Property name="UseLight" />
<!-- Light -->
<Property name="LightAmbientColor" />
<Property name="LightSpecularColor" />
<Property name="LightIntensity" />
<Property name="LightSwitch" />
<!-- LightKit -->
<Property name="KeyLightWarmth" />
<Property name="KeyLightIntensity" />
<Property name="KeyLightElevation" />
<Property name="KeyLightAzimuth" />
<Property name="FillLightWarmth" />
<Property name="FillLightK:F Ratio" />
<Property name="FillLightElevation" />
<Property name="FillLightAzimuth" />
<Property name="BackLightWarmth" />
<Property name="BackLightK:B Ratio" />
<Property name="BackLightElevation" />
<Property name="BackLightAzimuth" />
<Property name="HeadLightWarmth" />
<Property name="HeadLightK:H Ratio" />
<Property name="MaintainLuminance" />
<!-- ActiveCamera -->
<Property name="CameraPositionInfo" />
<Property name="CameraPosition" />
<Property name="CameraFocalPointInfo" />
<Property name="CameraFocalPoint" />
<Property name="CameraViewUpInfo" />
<Property name="CameraViewUp" />
<Property name="CameraViewAngle" />
<Property name="CameraClippingRangeInfo" />
<Property name="CameraClippingRange" />
<Property name="CameraParallelScale" />
<Property name="CameraParallelProjection" />
<Property name="EyeAngle" />
<!-- Interactor -->
<Property name="CameraManipulators" />
<Property name="CenterOfRotation" />
<!-- Renderer -->
<Property name="Background" />
<!-- RenderWindow -->
<Property name="RenderWindowSizeInfo" />
</ExposedProperties>
<!-- End of "RootView" subproxy -->
</SubProxy>
<!-- End of ComparativeRenderView -->
</ComparativeViewProxy>
<!-- End if group "newviews" -->
</ProxyGroup>
......
......@@ -18,10 +18,13 @@
#include "vtkMemberFunctionCommand.h"
#include "vtkObjectFactory.h"
#include "vtkSmartPointer.h"
#include "vtkSMCameraLink.h"
#include "vtkSMPropertyIterator.h"
#include "vtkSMProxyLink.h"
#include "vtkSMProxyManager.h"
#include "vtkSMPVAnimationSceneProxy.h"
#include "vtkSMRepresentationProxy.h"
#include "vtkSMProperty.h"
#include <vtkstd/vector>
#include <vtkstd/map>
......@@ -47,10 +50,12 @@ public:
MapOfReprClones RepresentationClones;
vtkSmartPointer<vtkSMProxyLink> ViewLink;
vtkSmartPointer<vtkSMCameraLink> ViewCameraLink;
vtkInternal()
{
this->ViewLink = vtkSmartPointer<vtkSMProxyLink>::New();
this->ViewCameraLink = vtkSmartPointer<vtkSMCameraLink>::New();
}
unsigned int ActiveIndexX;
......@@ -60,7 +65,7 @@ public:
//----------------------------------------------------------------------------
vtkStandardNewMacro(vtkSMComparativeViewProxy);
vtkCxxRevisionMacro(vtkSMComparativeViewProxy, "1.2");
vtkCxxRevisionMacro(vtkSMComparativeViewProxy, "1.3");
vtkCxxSetObjectMacro(vtkSMComparativeViewProxy, AnimationSceneX, vtkSMPVAnimationSceneProxy);
vtkCxxSetObjectMacro(vtkSMComparativeViewProxy, AnimationSceneY, vtkSMPVAnimationSceneProxy);
//----------------------------------------------------------------------------
......@@ -104,6 +109,8 @@ bool vtkSMComparativeViewProxy::BeginCreateVTKObjects()
// Root view is the first view in the views list.
this->Internal->Views.push_back(rootView);
this->Internal->ViewCameraLink->AddLinkedProxy(rootView, vtkSMLink::INPUT);
this->Internal->ViewCameraLink->AddLinkedProxy(rootView, vtkSMLink::OUTPUT);
this->Internal->ViewLink->AddLinkedProxy(rootView, vtkSMLink::INPUT);
// Every view keeps their own representations.
......@@ -113,6 +120,15 @@ bool vtkSMComparativeViewProxy::BeginCreateVTKObjects()
// layout.
this->Internal->ViewLink->AddException("ViewSize");
this->Internal->ViewLink->AddException("ViewPosition");
this->Internal->ViewLink->AddException("CameraPositionInfo");
this->Internal->ViewLink->AddException("CameraPosition");
this->Internal->ViewLink->AddException("CameraFocalPointInfo");
this->Internal->ViewLink->AddException("CameraFocalPoint");
this->Internal->ViewLink->AddException("CameraViewUpInfo");
this->Internal->ViewLink->AddException("CameraViewUp");
this->Internal->ViewLink->AddException("CameraClippingRangeInfo");
this->Internal->ViewLink->AddException("CameraClippingRange");
return this->Superclass::BeginCreateVTKObjects();
}
......@@ -147,6 +163,9 @@ void vtkSMComparativeViewProxy::Build(int dx, int dy)
this->Dimensions[1] = dy;
// TODO: Update ViewSize ViewPosition for all internal views.
// Whenever the layout changes we'll fire the ConfigureEvent.
this->InvokeEvent(vtkCommand::ConfigureEvent);
}
//----------------------------------------------------------------------------
......@@ -155,6 +174,23 @@ vtkSMViewProxy* vtkSMComparativeViewProxy::GetRootView()
return this->Internal->Views[0];
}
//----------------------------------------------------------------------------
static void vtkCopyClone(vtkSMProxy* source, vtkSMProxy* clone)
{
vtkSmartPointer<vtkSMPropertyIterator> iterSource;
vtkSmartPointer<vtkSMPropertyIterator> iterDest;
iterSource.TakeReference(source->NewPropertyIterator());
iterDest.TakeReference(clone->NewPropertyIterator());
// Since source/clone are exact copies, the following is safe.
for (; !iterSource->IsAtEnd() && !iterDest->IsAtEnd();
iterSource->Next(), iterDest->Next())
{
iterDest->GetProperty()->Copy(iterSource->GetProperty());
}
}
//----------------------------------------------------------------------------
void vtkSMComparativeViewProxy::AddNewView()
{
......@@ -169,14 +205,17 @@ void vtkSMComparativeViewProxy::AddNewView()
"view cannot work.");
return;
}
newView->UpdateVTKObjects();
this->Internal->Views.push_back(newView);
this->Internal->ViewCameraLink->AddLinkedProxy(newView, vtkSMLink::INPUT);
this->Internal->ViewCameraLink->AddLinkedProxy(newView, vtkSMLink::OUTPUT);
this->Internal->ViewLink->AddLinkedProxy(newView, vtkSMLink::OUTPUT);
newView->Delete();
// Ensure that views always use cache.
newView->SetUseCache(true);
//newView->SetUseCache(true);
newView->SetCacheTime(0); // cache time value is merely is place holder.
// All views cache only 1 time, hence this number is
// immaterial.
......@@ -191,7 +230,7 @@ void vtkSMComparativeViewProxy::AddNewView()
vtkSMRepresentationProxy* newRepr = vtkSMRepresentationProxy::SafeDownCast(
pxm->NewProxy(repr->GetXMLGroup(), repr->GetXMLName()));
newRepr->Copy(repr); // create a clone.
vtkCopyClone(repr, newRepr); // create a clone.
newRepr->UpdateVTKObjects();
data.Link->AddLinkedProxy(newRepr, vtkSMLink::OUTPUT);
......@@ -231,6 +270,8 @@ void vtkSMComparativeViewProxy::RemoveView(vtkSMViewProxy* view)
}
this->Internal->ViewLink->RemoveLinkedProxy(view);
this->Internal->ViewCameraLink->RemoveLinkedProxy(view);
vtkInternal::VectorOfViews::iterator iter;
for (iter = this->Internal->Views.begin();
iter != this->Internal->Views.end(); ++iter)
......@@ -269,7 +310,7 @@ void vtkSMComparativeViewProxy::AddRepresentation(vtkSMRepresentationProxy* repr
{
vtkSMRepresentationProxy* newRepr = vtkSMRepresentationProxy::SafeDownCast(
pxm->NewProxy(repr->GetXMLGroup(), repr->GetXMLName()));
newRepr->Copy(repr); // create a clone.
vtkCopyClone(repr, newRepr); // create a clone.
newRepr->UpdateVTKObjects();
reprLink->AddLinkedProxy(newRepr, vtkSMLink::OUTPUT);
......@@ -368,9 +409,9 @@ void vtkSMComparativeViewProxy::InteractiveRender()
//----------------------------------------------------------------------------
vtkSMRepresentationProxy* vtkSMComparativeViewProxy::CreateDefaultRepresentation(
vtkSMProxy* src)
vtkSMProxy* src, int outputport)
{
return this->GetRootView()->CreateDefaultRepresentation(src);
return this->GetRootView()->CreateDefaultRepresentation(src, outputport);
}
//----------------------------------------------------------------------------
......
......@@ -58,22 +58,22 @@ public:
// Removes all added representations from this view.
// Simply calls RemoveRepresentation() on all added representations
// one by one.
void RemoveAllRepresentations();
virtual void RemoveAllRepresentations();
// Description:
// Forwards the call to all internal views.
void StillRender();
virtual void StillRender();
// Description:
// Renders the view using lower resolution is possible.
// Forwards the call to all internal views.
void InteractiveRender();
virtual void InteractiveRender();
// Description:
// Create a default representation for the given source proxy.
// Returns a new proxy.
// Overridden to forward the call to the internal root view proxy.
virtual vtkSMRepresentationProxy* CreateDefaultRepresentation(vtkSMProxy*);
virtual vtkSMRepresentationProxy* CreateDefaultRepresentation(vtkSMProxy*, int);
// Description:
// Set the animation scene played along X-axis.
......
/*=========================================================================
Program: ParaView
Module: vtkSMRenderViewHelper.cxx
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkSMRenderViewHelper.h"
#include "vtkObjectFactory.h"
#include "vtkSMRenderViewProxy.h"
vtkStandardNewMacro(vtkSMRenderViewHelper);
vtkCxxRevisionMacro(vtkSMRenderViewHelper, "1.1");
//----------------------------------------------------------------------------
vtkSMRenderViewHelper::vtkSMRenderViewHelper()
{
this->RenderViewProxy = 0;
}
//----------------------------------------------------------------------------
vtkSMRenderViewHelper::~vtkSMRenderViewHelper()
{
this->SetRenderViewProxy(0);
}
//----------------------------------------------------------------------------
void vtkSMRenderViewHelper::EventuallyRender()
{
if (this->RenderViewProxy)
{
this->RenderViewProxy->StillRender();
}
}
//----------------------------------------------------------------------------
void vtkSMRenderViewHelper::Render()
{
if (this->RenderViewProxy)
{
this->RenderViewProxy->InteractiveRender();
}
}
//----------------------------------------------------------------------------
vtkRenderWindow* vtkSMRenderViewHelper::GetRenderWindow()
{
return (this->RenderViewProxy?
this->RenderViewProxy->GetRenderWindow() : 0);
}
//----------------------------------------------------------------------------
void vtkSMRenderViewHelper::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
}
/*=========================================================================
Program: ParaView
Module: vtkSMRenderViewHelper.h
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkSMRenderViewHelper
// .SECTION Description
// Helper used to provide access to the render view proxy from the interactor.
#ifndef __vtkSMRenderViewHelper_h
#define __vtkSMRenderViewHelper_h
#include "vtkPVRenderViewProxy.h"
class vtkSMRenderViewProxy;
class VTK_EXPORT vtkSMRenderViewHelper : public vtkPVRenderViewProxy
{
public:
static vtkSMRenderViewHelper* New();
vtkTypeRevisionMacro(vtkSMRenderViewHelper, vtkPVRenderViewProxy);
void PrintSelf(ostream& os, vtkIndent indent);
// Implemeting API from vtkPVRenderViewProxy.
virtual void Render();
virtual void EventuallyRender();
virtual vtkRenderWindow* GetRenderWindow();
// no reference counting.
void SetRenderViewProxy(vtkSMRenderViewProxy* proxy)
{ this->RenderViewProxy = proxy; }
vtkGetObjectMacro(RenderViewProxy, vtkSMRenderViewProxy);
//BTX
protected:
vtkSMRenderViewHelper();
~vtkSMRenderViewHelper();
vtkSMRenderViewProxy* RenderViewProxy;
private:
vtkSMRenderViewHelper(const vtkSMRenderViewHelper&); // Not implemented
void operator=(const vtkSMRenderViewHelper&); // Not implemented
//ETX
};
#endif
......@@ -57,6 +57,7 @@
#include "vtkTimerLog.h"
#include "vtkWindowToImageFilter.h"
#include "vtkPVDisplayInformation.h"
#include "vtkSMRenderViewHelper.h"
#include "vtkSMMultiProcessRenderView.h"
......@@ -83,7 +84,7 @@ inline bool SetIntVectorProperty(vtkSMProxy* proxy, const char* pname,
}
//-----------------------------------------------------------------------------
vtkCxxRevisionMacro(vtkSMRenderViewProxy, "1.23");
vtkCxxRevisionMacro(vtkSMRenderViewProxy, "1.24");
vtkStandardNewMacro(vtkSMRenderViewProxy);
vtkInformationKeyMacro(vtkSMRenderViewProxy, USE_LOD, Integer);
......@@ -100,6 +101,7 @@ vtkSMRenderViewProxy::vtkSMRenderViewProxy()
this->ActiveCameraProxy = 0;
this->RenderWindowProxy = 0;
this->InteractorProxy = 0;
this->InteractorStyleProxy = 0;
this->LightKitProxy = 0;
this->RenderInterruptsEnabled = 1;
......@@ -109,6 +111,9 @@ vtkSMRenderViewProxy::vtkSMRenderViewProxy()
this->Interactor = 0;
this->ActiveCamera = 0;
this->RenderViewHelper = vtkSMRenderViewHelper::New();
this->RenderViewHelper->SetRenderViewProxy(this); //not reference counted.
this->UseTriangleStrips = 0;
this->ForceTriStripUpdate = 0;
this->UseImmediateMode = 1;
......@@ -130,6 +135,9 @@ vtkSMRenderViewProxy::vtkSMRenderViewProxy()
//-----------------------------------------------------------------------------
vtkSMRenderViewProxy::~vtkSMRenderViewProxy()
{
this->RenderViewHelper->SetRenderViewProxy(0);
this->RenderViewHelper->Delete();