VTK  9.1.0
vtkButtonSource.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkButtonSource.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm 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=========================================================================*/
44#ifndef vtkButtonSource_h
45#define vtkButtonSource_h
46
47#include "vtkFiltersSourcesModule.h" // For export macro
49
50#define VTK_TEXTURE_STYLE_FIT_IMAGE 0
51#define VTK_TEXTURE_STYLE_PROPORTIONAL 1
52
53class VTKFILTERSSOURCES_EXPORT vtkButtonSource : public vtkPolyDataAlgorithm
54{
55public:
56 void PrintSelf(ostream& os, vtkIndent indent) override;
58
60
63 vtkSetVector3Macro(Center, double);
64 vtkGetVectorMacro(Center, double, 3);
66
68
73 vtkSetClampMacro(TextureStyle, int, VTK_TEXTURE_STYLE_FIT_IMAGE, VTK_TEXTURE_STYLE_PROPORTIONAL);
74 vtkGetMacro(TextureStyle, int);
75 void SetTextureStyleToFitImage() { this->SetTextureStyle(VTK_TEXTURE_STYLE_FIT_IMAGE); }
78
80
84 vtkSetVector2Macro(TextureDimensions, int);
85 vtkGetVector2Macro(TextureDimensions, int);
87
89
92 vtkSetVector2Macro(ShoulderTextureCoordinate, double);
93 vtkGetVector2Macro(ShoulderTextureCoordinate, double);
95
97
103 vtkSetMacro(TwoSided, vtkTypeBool);
104 vtkGetMacro(TwoSided, vtkTypeBool);
105 vtkBooleanMacro(TwoSided, vtkTypeBool);
107
108protected:
110 ~vtkButtonSource() override = default;
111
112 double Center[3];
113 double ShoulderTextureCoordinate[2];
115 int TextureDimensions[2];
117
118private:
119 vtkButtonSource(const vtkButtonSource&) = delete;
120 void operator=(const vtkButtonSource&) = delete;
121};
122
123#endif
abstract class for creating various button types
~vtkButtonSource() override=default
void SetTextureStyleToProportional()
Set/Get the style of the texture region: whether to size it according to the x-y dimensions of the te...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetTextureStyleToFitImage()
Set/Get the style of the texture region: whether to size it according to the x-y dimensions of the te...
vtkTypeBool TwoSided
a simple class to control print indentation
Definition: vtkIndent.h:113
Superclass for algorithms that produce only polydata as output.
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_TEXTURE_STYLE_PROPORTIONAL
#define VTK_TEXTURE_STYLE_FIT_IMAGE