Commit 35235114 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Refactoring SelectionRepresentation for charts.

Charts using the same representation (vtkChartRepresentation) to manage data as
well as selection. The problem with  this approach is that whenever the
selection changes, we have to reexecute the vtkChartRepresentation even if the
data didn't change and only the selection changed. The representations in 3D
view deal with this my creating a separate SelectionRepresentation and the
selection input is fed directly to this representation. That way when the
selection changes, only the SelectionRepresentation is modified. We adopt that
same approach for chart representations.

Added a new vtkChartSelectionRepresentation. vtkChartRepresentation now creates
a vtkChartSelectionRepresentation that deals with delivering/showing selections.
vtkSIChartRepresentationProxy ensures that the vtkChartSelectionRepresentation
is set correctly on the vtkChartRepresentation; while
vtkSMChartRepresentationProxy ensures that the selection-input is set correctly
on the proxy corresponding to vtkChartSelectionRepresentation.

+ Also cleaned up AnnotationLink. Now, we consistently create AnnotationLink in
the vtkPVContextView (or subclass). In the past the link was created in
vtkChartRepresentation or vtkPVPlotMatrixView.

+ Also cleaned up vtkPVCompositeRepresentation.

During the evolution of vtkPVCompositeRepresentation, there was stage when we
were thinking of passing selection-input transparently to the
SelectionRepresentation held by vtkPVCompositeRepresentation. However, that
meant that vtkPVCompositeRepresentation would be marked as modified whenever the
selection changed. So to avoid that, we changed the code to setup the selection
input directly to the SelectionRepresentation in vtkSMPVRepresentationProxy.
The unused code persisted in vtkPVCompositeRepresentation. Removing that.

Change-Id: I1c834976c1aeb6343732a3c61fb3bd4876562ff0
parent 899fac34
......@@ -35,6 +35,7 @@ set (Module_SRCS
vtkAMRStreamingVolumeRepresentation.cxx
vtkCaveSynchronizedRenderers.cxx
vtkChartRepresentation.cxx
vtkChartSelectionRepresentation.cxx
vtkClientServerMoveData.cxx
vtkCompositeRepresentation.cxx
vtkCompositeSliceRepresentation.cxx
......
......@@ -19,6 +19,7 @@
#include "vtkBlockDeliveryPreprocessor.h"
#include "vtkChart.h"
#include "vtkChartNamedOptions.h"
#include "vtkChartSelectionRepresentation.h"
#include "vtkClientServerMoveData.h"
#include "vtkCommand.h"
#include "vtkContextView.h"
......@@ -34,21 +35,17 @@
#include "vtkPVMergeTables.h"
#include "vtkReductionFilter.h"
#include "vtkScatterPlotMatrix.h"
#include "vtkSelectionDeliveryFilter.h"
#include "vtkSelection.h"
#include "vtkSelectionSerializer.h"
#include "vtkTable.h"
#include <vtksys/ios/sstream>
vtkStandardNewMacro(vtkChartRepresentation);
vtkCxxSetObjectMacro(vtkChartRepresentation, Options, vtkChartNamedOptions);
//----------------------------------------------------------------------------
vtkChartRepresentation::vtkChartRepresentation()
{
this->SetNumberOfInputPorts(2);
this->SelectionRepresentation = 0;
vtkNew<vtkChartSelectionRepresentation> selectionRepr;
this->SetSelectionRepresentation(selectionRepr.GetPointer());
this->AnnLink = vtkAnnotationLink::New();
this->Options = 0;
this->Preprocessor = vtkBlockDeliveryPreprocessor::New();
......@@ -70,8 +67,6 @@ vtkChartRepresentation::vtkChartRepresentation()
this->DeliveryFilter = vtkClientServerMoveData::New();
this->DeliveryFilter->SetOutputDataType(VTK_TABLE);
this->SelectionDeliveryFilter = vtkSelectionDeliveryFilter::New();
this->EnableServerSideRendering = false;
}
......@@ -79,14 +74,28 @@ vtkChartRepresentation::vtkChartRepresentation()
vtkChartRepresentation::~vtkChartRepresentation()
{
this->SetOptions(0);
this->AnnLink->Delete();
this->Preprocessor->Delete();
this->CacheKeeper->Delete();
this->ReductionFilter->Delete();
this->DeliveryFilter->Delete();
this->SetSelectionRepresentation(NULL);
}
this->SelectionDeliveryFilter->Delete();
//----------------------------------------------------------------------------
void vtkChartRepresentation::SetSelectionRepresentation(
vtkChartSelectionRepresentation* repr)
{
if (this->SelectionRepresentation && (repr != this->SelectionRepresentation))
{
this->SelectionRepresentation->SetChartRepresentation(NULL);
}
vtkSetObjectBodyMacro(SelectionRepresentation,
vtkChartSelectionRepresentation, repr);
if (repr)
{
repr->SetChartRepresentation(this);
}
}
//----------------------------------------------------------------------------
......@@ -121,6 +130,8 @@ bool vtkChartRepresentation::AddToView(vtkView* view)
}
this->Options->SetTableVisibility(this->GetVisibility());
}
view->AddRepresentation(this->SelectionRepresentation);
return true;
}
......@@ -140,6 +151,7 @@ bool vtkChartRepresentation::RemoveFromView(vtkView* view)
this->Options->SetPlotMatrix(0);
}
this->ContextView = 0;
view->RemoveRepresentation(this->SelectionRepresentation);
return true;
}
......@@ -152,11 +164,6 @@ int vtkChartRepresentation::FillInputPortInformation(
info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataObject");
info->Set(vtkAlgorithm::INPUT_IS_OPTIONAL(), 1);
}
else
{
info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkSelection");
info->Set(vtkAlgorithm::INPUT_IS_OPTIONAL(), 1);
}
return 1;
}
......@@ -183,6 +190,7 @@ vtkTable* vtkChartRepresentation::GetLocalOutput()
int vtkChartRepresentation::RequestData(vtkInformation* request,
vtkInformationVector** inputVector, vtkInformationVector* outputVector)
{
cout << "vtkChartRepresentation::RequestData" << endl;
if (vtkProcessModule::GetProcessType() == vtkProcessModule::PROCESS_RENDER_SERVER)
{
return this->Superclass::RequestData(request, inputVector, outputVector);
......@@ -190,7 +198,6 @@ int vtkChartRepresentation::RequestData(vtkInformation* request,
this->ReductionFilter->Modified();
this->DeliveryFilter->Modified();
this->SelectionDeliveryFilter->Modified();
// remove the "cached" delivered data.
if (this->LocalOutput)
......@@ -208,8 +215,7 @@ int vtkChartRepresentation::RequestData(vtkInformation* request,
if (inputVector[0]->GetNumberOfInformationObjects()==1)
{
this->Preprocessor->SetInputConnection(
this->GetInternalOutputPort(0));
this->Preprocessor->SetInputData(vtkDataObject::GetData(inputVector[0], 0));
this->Preprocessor->Update();
this->DeliveryFilter->SetInputConnection(this->ReductionFilter->GetOutputPort());
this->ReductionFilter->Update();
......@@ -245,74 +251,6 @@ int vtkChartRepresentation::RequestData(vtkInformation* request,
this->Options->SetTable(this->GetLocalOutput());
}
// Now deliver the selection.
vtkSmartPointer<vtkSelection> sel;
if (inputVector[1]->GetNumberOfInformationObjects()==1)
{
this->SelectionDeliveryFilter->SetInputConnection(
this->GetInternalOutputPort(1, 0));
this->SelectionDeliveryFilter->Update();
if (this->EnableServerSideRendering)
{
if (numProcs > 1)
{
vtkMultiProcessController* controller = pm->GetGlobalController();
if (myId == 0)
{
sel = vtkSelection::SafeDownCast(
this->GetInternalOutputPort(1, 0)->GetProducer()->
GetOutputDataObject(0));
vtksys_ios::ostringstream res;
vtkSelectionSerializer::PrintXML(res, vtkIndent(), 1, sel);
// Send the size of the string.
int size = static_cast<int>(res.str().size());
controller->Broadcast(&size, 1, 0);
// Send the XML string.
controller->Broadcast(
const_cast<char*>(res.str().c_str()), size, 0);
}
else
{
int size = 0;
controller->Broadcast(&size, 1, 0);
char* xml = new char[size+1];
// Get the string itself.
controller->Broadcast(xml, size, 0);
xml[size] = 0;
// Parse the XML.
sel = vtkSmartPointer<vtkSelection>::New();
vtkSelectionSerializer::Parse(xml, sel);
delete[] xml;
}
}
}
else
{
sel = vtkSelection::SafeDownCast(
this->SelectionDeliveryFilter->GetOutputDataObject(0));
}
}
else
{
this->SelectionDeliveryFilter->RemoveAllInputs();
this->SelectionDeliveryFilter->Update();
sel = vtkSelection::SafeDownCast(
this->SelectionDeliveryFilter->GetOutputDataObject(0));
}
if (this->ContextView)
{
if(vtkChart *chart = vtkChart::SafeDownCast(this->ContextView->GetContextItem()))
{
this->AnnLink->SetCurrentSelection(sel);
chart->SetAnnotationLink(this->AnnLink);
}
}
return this->Superclass::RequestData(request, inputVector, outputVector);
}
......@@ -330,6 +268,7 @@ void vtkChartRepresentation::MarkModified()
// Cleanup caches when not using cache.
this->CacheKeeper->RemoveAllCaches();
}
this->SelectionRepresentation->MarkModified();
this->Superclass::MarkModified();
}
......@@ -341,6 +280,8 @@ void vtkChartRepresentation::SetVisibility(bool visible)
{
this->Options->SetTableVisibility(visible);
}
this->SelectionRepresentation->SetVisibility(
this->GetVisibility() && visible);
}
//----------------------------------------------------------------------------
......@@ -390,3 +331,11 @@ void vtkChartRepresentation::SetCompositeDataSetIndex(unsigned int v)
this->Preprocessor->SetCompositeDataSetIndex(v);
this->MarkModified();
}
//----------------------------------------------------------------------------
unsigned int vtkChartRepresentation::Initialize(
unsigned int minId, unsigned int maxId)
{
minId = this->SelectionRepresentation->Initialize(minId, maxId);
return this->Superclass::Initialize(minId, maxId);
}
......@@ -31,7 +31,6 @@
#include "vtkWeakPointer.h" // needed for vtkWeakPointer
#include "vtkSmartPointer.h" // needed for vtkSmartPointer
class vtkAnnotationLink;
class vtkBlockDeliveryPreprocessor;
class vtkClientServerMoveData;
class vtkChartNamedOptions;
......@@ -40,6 +39,7 @@ class vtkPVContextView;
class vtkReductionFilter;
class vtkSelectionDeliveryFilter;
class vtkTable;
class vtkChartSelectionRepresentation;
class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkChartRepresentation : public vtkPVDataRepresentation
{
......@@ -48,6 +48,11 @@ public:
vtkTypeMacro(vtkChartRepresentation, vtkPVDataRepresentation);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// These must only be set during initialization before adding the
// representation to any views or calling Update().
void SetSelectionRepresentation(vtkChartSelectionRepresentation*);
// Description:
// Set the options object. This must be done before any other state is
// updated.
......@@ -83,6 +88,12 @@ public:
void SetFieldAssociation(int);
void SetCompositeDataSetIndex(unsigned int);
// Description:
// Override because of internal selection representations that need to be
// initilized as well.
virtual unsigned int Initialize(unsigned int minIdAvailable, unsigned int maxIdAvailable);
//BTX
protected:
vtkChartRepresentation();
......@@ -135,13 +146,11 @@ protected:
vtkWeakPointer<vtkPVContextView> ContextView;
vtkChartNamedOptions* Options;
vtkSelectionDeliveryFilter* SelectionDeliveryFilter;
vtkAnnotationLink* AnnLink;
bool EnableServerSideRendering;
vtkSmartPointer<vtkTable> LocalOutput;
vtkChartSelectionRepresentation* SelectionRepresentation;
private:
vtkChartRepresentation(const vtkChartRepresentation&); // Not implemented
void operator=(const vtkChartRepresentation&); // Not implemented
......
/*=========================================================================
Program: ParaView
Module: vtkChartSelectionRepresentation.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 "vtkChartSelectionRepresentation.h"
#include "vtkChartRepresentation.h"
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkMultiProcessController.h"
#include "vtkNew.h"
#include "vtkObjectFactory.h"
#include "vtkProcessModule.h"
#include "vtkProperty.h"
#include "vtkPVContextView.h"
#include "vtkSelectionDeliveryFilter.h"
#include "vtkSelection.h"
#include "vtkSelectionSerializer.h"
#include <assert.h>
#include <vtksys/ios/sstream>
vtkStandardNewMacro(vtkChartSelectionRepresentation);
//----------------------------------------------------------------------------
vtkChartSelectionRepresentation::vtkChartSelectionRepresentation()
{
this->EnableServerSideRendering = false;
}
//----------------------------------------------------------------------------
vtkChartSelectionRepresentation::~vtkChartSelectionRepresentation()
{
}
//----------------------------------------------------------------------------
void vtkChartSelectionRepresentation::SetChartRepresentation(
vtkChartRepresentation* repr)
{
this->ChartRepresentation = repr;
}
//----------------------------------------------------------------------------
void vtkChartSelectionRepresentation::SetVisibility(bool val)
{
this->Superclass::SetVisibility(val);
}
//----------------------------------------------------------------------------
bool vtkChartSelectionRepresentation::AddToView(vtkView* view)
{
vtkPVContextView* pvview = vtkPVContextView::SafeDownCast(view);
if (pvview)
{
this->View = pvview;
this->EnableServerSideRendering = pvview->InTileDisplayMode();
return true;
}
return false;
}
//----------------------------------------------------------------------------
bool vtkChartSelectionRepresentation::RemoveFromView(vtkView* view)
{
if (view == this->View.GetPointer())
{
this->View = NULL;
this->EnableServerSideRendering = false;
return true;
}
return false;
}
//----------------------------------------------------------------------------
int vtkChartSelectionRepresentation::FillInputPortInformation(
int vtkNotUsed(port), vtkInformation* info)
{
info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkSelection");
info->Set(vtkAlgorithm::INPUT_IS_OPTIONAL(), 1);
return 1;
}
//----------------------------------------------------------------------------
int vtkChartSelectionRepresentation::RequestData(vtkInformation* request,
vtkInformationVector** inputVector, vtkInformationVector* outputVector)
{
cout << "vtkChartSelectionRepresentation::RequestData" << endl;
if (vtkProcessModule::GetProcessType() == vtkProcessModule::PROCESS_RENDER_SERVER)
{
return this->Superclass::RequestData(request, inputVector, outputVector);
}
vtkSmartPointer<vtkSelection> localSelection;
if (inputVector[0]->GetNumberOfInformationObjects()==1)
{
vtkSelection* inputSelection = vtkSelection::GetData(inputVector[0], 0);
assert(inputSelection);
vtkNew<vtkSelectionDeliveryFilter> courier;
courier->SetInputDataObject(inputSelection);
courier->Update();
localSelection = vtkSelection::SafeDownCast(courier->GetOutputDataObject(0));
if (this->EnableServerSideRendering)
{
// distribute the selection from the root node to all processes.
vtkProcessModule* pm = vtkProcessModule::GetProcessModule();
int myId = pm->GetPartitionId();
int numProcs = pm->GetNumberOfLocalPartitions();
if (numProcs > 1)
{
vtkMultiProcessController* controller = pm->GetGlobalController();
if (myId == 0)
{
vtksys_ios::ostringstream res;
vtkSelectionSerializer::PrintXML(res, vtkIndent(), 1, inputSelection);
// Send the size of the string.
int size = static_cast<int>(res.str().size());
controller->Broadcast(&size, 1, 0);
// Send the XML string.
controller->Broadcast(
const_cast<char*>(res.str().c_str()), size, 0);
localSelection = inputSelection;
}
else
{
int size = 0;
controller->Broadcast(&size, 1, 0);
char* xml = new char[size+1];
// Get the string itself.
controller->Broadcast(xml, size, 0);
xml[size] = 0;
// Parse the XML.
vtkNew<vtkSelection> sel;
vtkSelectionSerializer::Parse(xml, sel.GetPointer());
delete[] xml;
localSelection = sel.GetPointer();
}
}
}
}
else
{
vtkNew<vtkSelectionDeliveryFilter> courier;
courier->Update();
localSelection = vtkSelection::SafeDownCast(courier->GetOutputDataObject(0));
}
if (this->View)
{
this->View->SetSelection(this->ChartRepresentation, localSelection);
}
return this->Superclass::RequestData(request, inputVector, outputVector);
}
//----------------------------------------------------------------------------
void vtkChartSelectionRepresentation::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
os << indent << "ChartRepresentation: "
<< this->ChartRepresentation.GetPointer() << endl;
os << indent << "EnableServerSideRendering: " <<
this->EnableServerSideRendering << endl;
}
/*=========================================================================
Program: ParaView
Module: vtkChartSelectionRepresentation.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 vtkChartSelectionRepresentation - representation for a cube-axes.
// .SECTION Description
// vtkChartSelectionRepresentation is a representation for the Cube-Axes that shows a
// bounding box with labels around any input dataset.
#ifndef __vtkChartSelectionRepresentation_h
#define __vtkChartSelectionRepresentation_h
#include "vtkPVClientServerCoreRenderingModule.h" //needed for exports
#include "vtkPVDataRepresentation.h"
#include "vtkWeakPointer.h" // needed for vtkWeakPointer.
#include "vtkSmartPointer.h" // needed for vtkWeakPointer.
class vtkChartRepresentation;
class vtkPVContextView;
class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkChartSelectionRepresentation : public vtkPVDataRepresentation
{
public:
static vtkChartSelectionRepresentation* New();
vtkTypeMacro(vtkChartSelectionRepresentation, vtkPVDataRepresentation);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// This needs to be called on all instances of vtkChartSelectionRepresentation when
// the input is modified.
virtual void MarkModified()
{ this->Superclass::MarkModified(); }
// Description:
// Set visibility of the representation.
virtual void SetVisibility(bool visible);
// Description:
// Get/Set the chart representation for which this is a selection
// representation. This is not reference counted.
void SetChartRepresentation(vtkChartRepresentation* repr);
//BTX
protected:
vtkChartSelectionRepresentation();
~vtkChartSelectionRepresentation();
virtual int FillInputPortInformation(int port, vtkInformation* info);
virtual int RequestData(vtkInformation*,
vtkInformationVector** inputVector, vtkInformationVector*);
// Description:
// Adds the representation to the view. This is called from
// vtkView::AddRepresentation(). Subclasses should override this method.
// Returns true if the addition succeeds.
virtual bool AddToView(vtkView* view);
// Description:
// Removes the representation to the view. This is called from
// vtkView::RemoveRepresentation(). Subclasses should override this method.
// Returns true if the removal succeeds.
virtual bool RemoveFromView(vtkView* view);
vtkWeakPointer<vtkPVContextView> View;
vtkWeakPointer<vtkChartRepresentation> ChartRepresentation;
// Flag updated in AddToView to indicate if the configuration requires
// server-side rendering.
bool EnableServerSideRendering;
private:
vtkChartSelectionRepresentation(const vtkChartSelectionRepresentation&); // Not implemented
void operator=(const vtkChartSelectionRepresentation&); // Not implemented
//ETX
};
#endif
......@@ -28,7 +28,6 @@ vtkCxxSetObjectMacro(vtkPVCompositeRepresentation, CubeAxesRepresentation,
//----------------------------------------------------------------------------
vtkPVCompositeRepresentation::vtkPVCompositeRepresentation()
{
this->SetNumberOfInputPorts(2);
this->SelectionRepresentation = vtkSelectionRepresentation::New();
this->CubeAxesRepresentation = vtkCubeAxesRepresentation::New();
......@@ -71,21 +70,13 @@ void vtkPVCompositeRepresentation::SetSelectionVisibility(bool visible)
//----------------------------------------------------------------------------
void vtkPVCompositeRepresentation::SetInputConnection(int port, vtkAlgorithmOutput* input)
{
if (port == 0)
{
this->CubeAxesRepresentation->SetInputConnection(0, input);
this->Superclass::SetInputConnection(0, input);
}
else if (port == 1)
{
this->SelectionRepresentation->SetInputConnection(0, input);
}
this->CubeAxesRepresentation->SetInputConnection(port, input);
this->Superclass::SetInputConnection(port, input);
}
//----------------------------------------------------------------------------
void vtkPVCompositeRepresentation::SetInputConnection(vtkAlgorithmOutput* input)
{
// port is assumed to be 0.
this->CubeAxesRepresentation->SetInputConnection(input);
this->Superclass::SetInputConnection(input);
}
......@@ -94,21 +85,13 @@ void vtkPVCompositeRepresentation::SetInputConnection(vtkAlgorithmOutput* input)
void vtkPVCompositeRepresentation::AddInputConnection(
int port, vtkAlgorithmOutput* input)
{
if (port == 0)
{
this->CubeAxesRepresentation->AddInputConnection(0, input);
this->Superclass::AddInputConnection(0, input);
}
else if (port == 1)
{
this->SelectionRepresentation->AddInputConnection(0, input);
}
this->CubeAxesRepresentation->AddInputConnection(port, input);
this->Superclass::AddInputConnection(port, input);
}
//----------------------------------------------------------------------------
void vtkPVCompositeRepresentation::AddInputConnection(vtkAlgorithmOutput* input)
{
// port is assumed to be 0.
this->CubeAxesRepresentation->AddInputConnection(input);
this->Superclass::AddInputConnection(input);
}
......@@ -116,29 +99,15 @@ void vtkPVCompositeRepresentation::AddInputConnection(vtkAlgorithmOutput* input)
//----------------------------------------------------------------------------
void vtkPVCompositeRepresentation::RemoveInputConnection(int port, vtkAlgorithmOutput* input)
{
if (port == 0)
{
this->CubeAxesRepresentation->RemoveInputConnection(0, input);
this->Superclass::RemoveInputConnection(0, input);
}
else if (port == 1)
{
this->SelectionRepresentation->RemoveInputConnection(0, input);
}
this->CubeAxesRepresentation->RemoveInputConnection(port, input);
this->Superclass::RemoveInputConnection(port, input);
}
//----------------------------------------------------------------------------
void vtkPVCompositeRepresentation::RemoveInputConnection(int port, int index)
{
if (port == 0)
{
this->CubeAxesRepresentation->RemoveInputConnection(0, index);
this->Superclass::RemoveInputConnection(0, index);
}
else if (port == 1)
{
this->SelectionRepresentation->RemoveInputConnection(0, index);
}
this->CubeAxesRepresentation->RemoveInputConnection(port, index);
this->Superclass::RemoveInputConnection(port, index);
}
//----------------------------------------------------------------------------
......@@ -165,21 +134,6 @@ void vtkPVCompositeRepresentation::MarkModified()
this->Superclass::MarkModified();
}
//----------------------------------------------------------------------------
int vtkPVCompositeRepresentation::FillInputPortInformation(
int port, vtkInformation* info)
{
if (port==0)
{
return this->Superclass::FillInputPortInformation(port, info);
}
info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkUnstructuredGrid");
info->Append(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkCompositeDataSet");
info->Set(vtkAlgorithm::INPUT_IS_OPTIONAL(), 1);
return 1;
}
//----------------------------------------------------------------------------
void vtkPVCompositeRepresentation::SetUpdateTime(double time)
{
......
......@@ -17,9 +17,10 @@
// vtkPVCompositeRepresentation is a data-representation used by ParaView for showing
// a type of data-set in the render view. It is a composite-representation with
// some fixed representations for showing things like selection and cube-axes.
// This representation has two input ports:
// \li 0: the dataset to show
// \li 1: the extracted selection to show
// This representation has 1 input port and it ensures that that input is passed
// on to the internal representations (except SelectionRepresentation) properly.
// For SelectionRepresentation, the client is expected to setup the input (look
// at vtkSMPVRepresentationProxy).
#ifndef __vtkPVCompositeRepresentation_h
#define __vtkPVCompositeRepresentation_h
......@@ -63,7 +64,12 @@ public:
// Overridden to update the cube-axes and selection visibilities.
virtual void SetVisibility(bool visible);
// Description:
// Set the visibility for the cube-axis.
void SetCubeAxesVisibility(bool visible);