vtkVolumeRepresentation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
9 #ifndef vtkVolumeRepresentation_h
10 #define vtkVolumeRepresentation_h
11 
13 
14 #include "vtkNew.h" // for vtkNew
15 #include "vtkPVLODVolume.h" // for ivars
16 #include "vtkRemotingViewsModule.h" //needed for exports
17 #include "vtkSmartPointer.h" //needed for vtkSmartPointer
18 
20 class vtkDataSet;
21 class vtkOutlineSource;
23 class vtkVolumeProperty;
24 
26 {
27 public:
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
35  void SetVisibility(bool val) override;
36 
37  //***************************************************************************
38  // Forwarded to Actor.
39  void SetOrientation(double, double, double);
40  void SetOrigin(double, double, double);
41  void SetPickable(int val);
42  void SetPosition(double, double, double);
43  void SetScale(double, double, double);
44 
45  //***************************************************************************
46  // Forwarded to vtkVolumeProperty and vtkProperty (when applicable).
47  void SetInterpolationType(int val);
48  void SetColor(vtkColorTransferFunction* lut);
49  void SetScalarOpacity(vtkPiecewiseFunction* pwf);
50  void SetScalarOpacityUnitDistance(double val);
51  void SetMapScalars(bool);
52  void SetMultiComponentsMapping(bool);
53 
54  //***************************************************************************
55  // For separate opacity array support
56  void SetUseSeparateOpacityArray(bool);
57  void SelectOpacityArray(int, int, int, int, const char* name);
58  void SelectOpacityArrayComponent(int component);
59 
63  vtkPVLODVolume* GetActor() { return this->Actor; }
64 
65 protected:
67  ~vtkVolumeRepresentation() override;
68 
72 
73  unsigned long DataSize = 0;
74  double DataBounds[6];
75 
76  bool MapScalars = true;
77  bool MultiComponentsMapping = false;
78 
79  bool UseSeparateOpacityArray = false;
80  std::string OpacityArrayName;
81  int OpacityArrayFieldAssociation = -1;
82  int OpacityArrayComponent = -1;
83 
87  bool AppendOpacityComponent(vtkDataSet* dataset);
88 
89 private:
91  void operator=(const vtkVolumeRepresentation&) = delete;
92 };
93 
94 #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.