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 
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
double range domain based on data set bounds
property representing pointer(s) to vtkObject(s)
type specific extension to vtkSMRangeDomainTemplate for doubles.
provides meta data about a vtkDataObject subclass.
#define VTKREMOTINGSERVERMANAGER_EXPORT
void PrintSelf(ostream &os, vtkIndent indent) override
virtual void Update(vtkSMProperty *requestingProperty)
Update self based on the "unchecked" values of all required properties.
superclass for all SM properties
static vtkSMDoubleRangeDomain * New()
property representing a vector of integers
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
virtual int ReadXMLAttributes(vtkSMProperty *prop, vtkPVXMLElement *elem)
Set the appropriate ivars from the xml element.
Modes
SCALED_EXTENT: is used for vtkPVScaleFactorEntry.
double range domain based on array range
This is used by vtkPVXMLParser to represent an XML document starting at the root element.