vtkSMBoundsDomain.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
48 #ifndef vtkSMBoundsDomain_h
49 #define vtkSMBoundsDomain_h
50 
51 #include "vtkRemotingServerManagerModule.h" //needed for exports
52 #include "vtkSMDoubleRangeDomain.h"
53 
55 class vtkSMProxyProperty;
58 
59 class VTKREMOTINGSERVERMANAGER_EXPORT vtkSMBoundsDomain : public vtkSMDoubleRangeDomain
60 {
61 public:
62  static vtkSMBoundsDomain* New();
64  void PrintSelf(ostream& os, vtkIndent indent) override;
65 
70  void Update(vtkSMProperty*) override;
71 
73  vtkSetClampMacro(Mode, int, 0, 3);
74  vtkGetMacro(Mode, int);
76 
80  enum Modes
81  {
91  };
92 
93  vtkGetMacro(ScaleFactor, double);
94 
95  enum Axes
96  {
97  X_AXIS = 1,
98  Y_AXIS = 2,
99  Z_AXIS = 4,
100  X_AND_Y_AXES = X_AXIS | Y_AXIS,
101  Y_AND_Z_AXES = Y_AXIS | Z_AXIS,
102  X_AND_Z_AXES = X_AXIS | Z_AXIS,
103  X_Y_AND_Z_AXES = X_AXIS | Y_AXIS | Z_AXIS
104  };
105 
106  vtkGetMacro(AxisFlags, int);
107 
111  int SetDefaultValues(vtkSMProperty* property, bool use_unchecked_values) override;
112 
113 protected:
115  ~vtkSMBoundsDomain() override;
116 
121  int ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* element) override;
122 
123  // Obtain the data information from the required property with
124  // function "Input", if any.
125  vtkPVDataInformation* GetInputInformation();
126 
127  // Obtain the information for the "AxisFlags" required property.
128  vtkSMIntVectorProperty* GetAxisFlagsInformation();
129 
130  bool IsAxisEnabled(int axis);
131 
132  void SetDomainValues(double bounds[6]);
133 
134  void UpdateOriented();
135 
136  int Mode;
137  double ScaleFactor; // Used only in SCALED_EXTENT and APPROXIMATE_CELL_LENGTH mode.
139 
140 private:
141  vtkSMBoundsDomain(const vtkSMBoundsDomain&) = delete;
142  void operator=(const vtkSMBoundsDomain&) = delete;
143 
144  vtkSMArrayRangeDomain* ArrayRangeDomain;
145 };
146 
147 #endif
vtkSMDoubleRangeDomain
type specific extension to vtkSMRangeDomainTemplate for doubles.
Definition: vtkSMDoubleRangeDomain.h:28
vtkSMBoundsDomain::Mode
int Mode
Definition: vtkSMBoundsDomain.h:136
vtkSMBoundsDomain::NORMAL
@ NORMAL
Definition: vtkSMBoundsDomain.h:82
vtkSMIntVectorProperty
property representing a vector of integers
Definition: vtkSMIntVectorProperty.h:21
vtkSMDomain::ReadXMLAttributes
virtual int ReadXMLAttributes(vtkSMProperty *prop, vtkPVXMLElement *elem)
Set the appropriate ivars from the xml element.
vtkSMBoundsDomain::COMPONENT_MAGNITUDE
@ COMPONENT_MAGNITUDE
Definition: vtkSMBoundsDomain.h:90
vtkSMProperty
superclass for all SM properties
Definition: vtkSMProperty.h:144
vtkSMBoundsDomain
double range domain based on data set bounds
Definition: vtkSMBoundsDomain.h:59
vtkSMBoundsDomain::MAGNITUDE
@ MAGNITUDE
Definition: vtkSMBoundsDomain.h:83
vtkSMDomain::Update
virtual void Update(vtkSMProperty *requestingProperty)
Update self based on the "unchecked" values of all required properties.
vtkSMBoundsDomain::AxisFlags
int AxisFlags
Definition: vtkSMBoundsDomain.h:138
vtkSMDoubleRangeDomain.h
vtkIndent
vtkSMBoundsDomain::DATA_BOUNDS
@ DATA_BOUNDS
Definition: vtkSMBoundsDomain.h:88
vtkSMBoundsDomain::ScaleFactor
double ScaleFactor
Definition: vtkSMBoundsDomain.h:137
vtkSMBoundsDomain::Modes
Modes
SCALED_EXTENT: is used for vtkPVScaleFactorEntry.
Definition: vtkSMBoundsDomain.h:80
vtkSMBoundsDomain::ARRAY_SCALED_EXTENT
@ ARRAY_SCALED_EXTENT
Definition: vtkSMBoundsDomain.h:86
vtkSMDoubleRangeDomain::New
static vtkSMDoubleRangeDomain * New()
vtkSMDomain::SetDefaultValues
virtual int SetDefaultValues(vtkSMProperty *, bool vtkNotUsed(use_unchecked_values))
A vtkSMProperty is often defined with a default value in the XML itself.
Definition: vtkSMDomain.h:91
vtkPVDataInformation
provides meta data about a vtkDataObject subclass.
Definition: vtkPVDataInformation.h:42
vtkPVXMLElement
Definition: vtkPVXMLElement.h:23
vtkSMBoundsDomain::APPROXIMATE_CELL_LENGTH
@ APPROXIMATE_CELL_LENGTH
Definition: vtkSMBoundsDomain.h:87
vtkSMArrayRangeDomain
double range domain based on array range
Definition: vtkSMArrayRangeDomain.h:23
vtkSMDoubleRangeDomain::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
vtkSMProxyProperty
property representing pointer(s) to vtkObject(s)
Definition: vtkSMProxyProperty.h:57
vtkSMBoundsDomain::SCALED_EXTENT
@ SCALED_EXTENT
Definition: vtkSMBoundsDomain.h:85
vtkSMBoundsDomain::ORIENTED_MAGNITUDE
@ ORIENTED_MAGNITUDE
Definition: vtkSMBoundsDomain.h:84
vtkSMBoundsDomain::EXTENTS
@ EXTENTS
Definition: vtkSMBoundsDomain.h:89
vtkSMBoundsDomain::Axes
Axes
Definition: vtkSMBoundsDomain.h:95