1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
/*=========================================================================
Program: ParaView
Module: vtkSMMultiSliceViewProxy.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.
=========================================================================*/
/**
* @class vtkSMMultiSliceViewProxy
*
* Custom RenderViewProxy to override CreateDefaultRepresentation method
* so only the Multi-Slice representation will be available to the user
*/
#ifndef vtkSMMultiSliceViewProxy_h
#define vtkSMMultiSliceViewProxy_h
#include "vtkPVServerManagerRenderingModule.h" //needed for exports
#include "vtkSMRenderViewProxy.h"
class vtkSMSourceProxy;
class VTKPVSERVERMANAGERRENDERING_EXPORT vtkSMMultiSliceViewProxy : public vtkSMRenderViewProxy
{
public:
static vtkSMMultiSliceViewProxy* New();
vtkTypeMacro(vtkSMMultiSliceViewProxy, vtkSMRenderViewProxy);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
/**
* Similar to IsSelectionAvailable(), however, on failure returns the
* error message otherwise 0.
*/
virtual const char* IsSelectVisiblePointsAvailable() VTK_OVERRIDE;
/**
* Overridden to set initial default slices when a representation is created.
* Not sure that's the best way to do this, but leaving the logic unchanged in
* this pass.
*/
virtual vtkSMRepresentationProxy* CreateDefaultRepresentation(
vtkSMProxy* proxy, int outputPort) VTK_OVERRIDE;
/**
* Overridden to forward the call to the internal root view proxy.
*/
virtual const char* GetRepresentationType(
vtkSMSourceProxy* producer, int outputPort) VTK_OVERRIDE;
/**
* Fetchs data bounds from the client-side object. We simply fetch the
* client-side data bounds since vtkPVMultiSliceView ensures that they are
* synced among all ranks in Update().
*/
void GetDataBounds(double bounds[6]);
/**
* HACK: method to force representation type to "Slices".
*/
static void ForceRepresentationType(vtkSMProxy* reprProxy, const char* type);
/**
* HACK: Get source's input data bounds (or BoundingBoxInModelCoordinates if
* present).
*/
static bool GetDataBounds(vtkSMSourceProxy* source, int opport, double bounds[6]);
protected:
vtkSMMultiSliceViewProxy();
~vtkSMMultiSliceViewProxy();
/**
* Use the center of the source to initialize the view with three orthogonal
* slices in x, y, z.
*/
void InitDefaultSlices(vtkSMSourceProxy* source, int opport, vtkSMRepresentationProxy* repr);
private:
vtkSMMultiSliceViewProxy(const vtkSMMultiSliceViewProxy&) VTK_DELETE_FUNCTION;
void operator=(const vtkSMMultiSliceViewProxy&) VTK_DELETE_FUNCTION;
class vtkInternals;
vtkInternals* Internals;
};
#endif
|