vtkPVBox.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVBox
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 =========================================================================*/
24 #ifndef vtkPVBox_h
25 #define vtkPVBox_h
26 
27 #include "vtkBox.h"
28 #include "vtkPVVTKExtensionsMiscModule.h" //needed for exports
29 
31 {
32 public:
33  static vtkPVBox* New();
34  vtkTypeMacro(vtkPVBox, vtkBox);
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
38 
44  void SetReferenceBounds(const double bds[6]);
46  double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
47  {
48  double bds[6] = { xmin, xmax, ymin, ymax, zmin, zmax };
49  this->SetReferenceBounds(bds);
50  }
51  vtkGetVector6Macro(ReferenceBounds, double);
53 
55 
59  void SetUseReferenceBounds(bool val);
60  vtkGetMacro(UseReferenceBounds, bool);
62 
64 
67  void SetPosition(double x, double y, double z)
68  {
69  double pos[3] = { x, y, z };
70  this->SetPosition(pos);
71  }
72  void SetPosition(const double pos[3]);
73  vtkGetVector3Macro(Position, double);
75 
77 
80  void SetRotation(double x, double y, double z)
81  {
82  double pos[3] = { x, y, z };
83  this->SetRotation(pos);
84  }
85  void SetRotation(const double pos[3]);
86  vtkGetVector3Macro(Rotation, double);
88 
90 
93  void SetScale(double x, double y, double z)
94  {
95  double pos[3] = { x, y, z };
96  this->SetScale(pos);
97  }
98  void SetScale(const double pos[3]);
99  vtkGetVector3Macro(Scale, double);
101 
102 protected:
103  vtkPVBox();
104  ~vtkPVBox() override;
105  void UpdateTransform();
106 
107  double Position[3];
108  double Rotation[3];
109  double Scale[3];
110  double ReferenceBounds[6];
112 
113 private:
114  vtkPVBox(const vtkPVBox&) = delete;
115  void operator=(const vtkPVBox&) = delete;
116 };
117 
118 #endif
static vtkBox * New()
extends vtkBox to add ParaView specific API.
Definition: vtkPVBox.h:30
void SetRotation(double x, double y, double z)
Get/Set Rotation for the box.
Definition: vtkPVBox.h:80
#define VTKPVVTKEXTENSIONSMISC_EXPORT
void SetReferenceBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
These bounds are used when UseReferenceBounds is set to true.
Definition: vtkPVBox.h:45
void SetPosition(double x, double y, double z)
Get/Set Position of the box.
Definition: vtkPVBox.h:67
bool UseReferenceBounds
Definition: vtkPVBox.h:111
void SetScale(double x, double y, double z)
Get/Set Scale for the box.
Definition: vtkPVBox.h:93
void operator=(const vtkObjectBase &)
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE