vtkVolumeRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkVolumeRepresentation.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
21 #ifndef vtkVolumeRepresentation_h
22 #define vtkVolumeRepresentation_h
23 
25 
26 #include "vtkNew.h" // for vtkNew
27 #include "vtkPVLODVolume.h" // for ivars
28 #include "vtkRemotingViewsModule.h" //needed for exports
29 #include "vtkSmartPointer.h" //needed for vtkSmartPointer
30 
32 class vtkDataSet;
33 class vtkOutlineSource;
35 class vtkVolumeProperty;
36 
38 {
39 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
47  void SetVisibility(bool val) override;
48 
49  //***************************************************************************
50  // Forwarded to Actor.
51  void SetOrientation(double, double, double);
52  void SetOrigin(double, double, double);
53  void SetPickable(int val);
54  void SetPosition(double, double, double);
55  void SetScale(double, double, double);
56 
57  //***************************************************************************
58  // Forwarded to vtkVolumeProperty and vtkProperty (when applicable).
59  void SetInterpolationType(int val);
60  void SetColor(vtkColorTransferFunction* lut);
61  void SetScalarOpacity(vtkPiecewiseFunction* pwf);
62  void SetScalarOpacityUnitDistance(double val);
63  void SetMapScalars(bool);
64  void SetMultiComponentsMapping(bool);
65 
66  //***************************************************************************
67  // For separate opacity array support
68  void SetUseSeparateOpacityArray(bool);
69  void SelectOpacityArray(int, int, int, int, const char* name);
70  void SelectOpacityArrayComponent(int component);
71 
75  vtkPVLODVolume* GetActor() { return this->Actor; }
76 
77 protected:
79  ~vtkVolumeRepresentation() override;
80 
84 
85  unsigned long DataSize = 0;
86  double DataBounds[6];
87 
88  bool MapScalars = true;
89  bool MultiComponentsMapping = false;
90 
91  bool UseSeparateOpacityArray = false;
92  std::string OpacityArrayName;
93  int OpacityArrayFieldAssociation = -1;
94  int OpacityArrayComponent = -1;
95 
99  bool AppendOpacityComponent(vtkDataSet* dataset);
100 
101 private:
103  void operator=(const vtkVolumeRepresentation&) = delete;
104 };
105 
106 #endif // vtkVolumeRepresentation_h
#define VTKREMOTINGVIEWS_EXPORT
vtkPVDataRepresentation adds some ParaView specific API to data representations.
virtual void SetVisibility(bool val)
Get/Set the visibility for this representation.
Abstract base class for volume representations.
an actor that supports multiple levels of detail
vtkNew< vtkOutlineSource > OutlineSource
vtkNew< vtkVolumeProperty > Property
void PrintSelf(ostream &os, vtkIndent indent) override
vtkSmartPointer< vtkPVLODVolume > Actor
vtkPVLODVolume * GetActor()
Provides access to the actor used by this representation.