VTK  9.3.20240423
vtkCheckerboardRepresentation.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
42#ifndef vtkCheckerboardRepresentation_h
43#define vtkCheckerboardRepresentation_h
44
45#include "vtkInteractionWidgetsModule.h" // For export macro
47#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
48
49VTK_ABI_NAMESPACE_BEGIN
51class vtkImageActor;
53
54class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkCheckerboardRepresentation
56{
57public:
62
64
68 void PrintSelf(ostream& os, vtkIndent indent) override;
70
72
76 vtkGetObjectMacro(Checkerboard, vtkImageCheckerboard);
78
80
83 void SetImageActor(vtkImageActor* imageActor);
84 vtkGetObjectMacro(ImageActor, vtkImageActor);
86
88
93 vtkSetClampMacro(CornerOffset, double, 0.0, 0.4);
94 vtkGetMacro(CornerOffset, double);
96
97 enum
98 {
99 TopSlider = 0,
102 LeftSlider
103 };
104
109 void SliderValueChanged(int sliderNum);
110
112
121 vtkGetObjectMacro(TopRepresentation, vtkSliderRepresentation3D);
122 vtkGetObjectMacro(RightRepresentation, vtkSliderRepresentation3D);
123 vtkGetObjectMacro(BottomRepresentation, vtkSliderRepresentation3D);
124 vtkGetObjectMacro(LeftRepresentation, vtkSliderRepresentation3D);
126
128
131 void BuildRepresentation() override;
134 int RenderOverlay(vtkViewport* viewport) override;
135 int RenderOpaqueGeometry(vtkViewport* viewport) override;
139
140protected:
143
144 // Instances that this class manipulates
147
148 // The internal widgets for each side
153
154 // The corner offset
156
157 // Direction index of image actor's plane normal
159
160private:
162 void operator=(const vtkCheckerboardRepresentation&) = delete;
163};
164
165VTK_ABI_NAMESPACE_END
166#endif
represent the vtkCheckerboardWidget
void SetImageActor(vtkImageActor *imageActor)
Specify an instance of vtkImageActor to decorate.
int RenderOverlay(vtkViewport *viewport) override
Methods required by superclass.
void GetActors(vtkPropCollection *) override
Methods required by superclass.
void SetCheckerboard(vtkImageCheckerboard *chkrbrd)
Specify an instance of vtkImageCheckerboard to manipulate.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK methods.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Methods required by superclass.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Methods required by superclass.
void SliderValueChanged(int sliderNum)
This method is invoked by the vtkCheckerboardWidget() when a value of some slider has changed.
void SetRightRepresentation(vtkSliderRepresentation3D *)
Set and get the instances of vtkSliderRepresentation used to implement this representation.
vtkSliderRepresentation3D * RightRepresentation
vtkSliderRepresentation3D * LeftRepresentation
void SetLeftRepresentation(vtkSliderRepresentation3D *)
Set and get the instances of vtkSliderRepresentation used to implement this representation.
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Methods required by superclass.
void BuildRepresentation() override
Methods required by superclass.
void SetBottomRepresentation(vtkSliderRepresentation3D *)
Set and get the instances of vtkSliderRepresentation used to implement this representation.
vtkSliderRepresentation3D * TopRepresentation
~vtkCheckerboardRepresentation() override
void ReleaseGraphicsResources(vtkWindow *w) override
Methods required by superclass.
vtkSliderRepresentation3D * BottomRepresentation
void SetTopRepresentation(vtkSliderRepresentation3D *)
Set and get the instances of vtkSliderRepresentation used to implement this representation.
static vtkCheckerboardRepresentation * New()
Instantiate class.
draw an image in a rendered 3D scene
show two images at once using a checkboard pattern
a simple class to control print indentation
Definition vtkIndent.h:108
an ordered list of Props
provide the representation for a vtkSliderWidget with a 3D skin
abstract specification for Viewports
Definition vtkViewport.h:65
abstract class defines interface between the widget and widget representation classes
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_MARSHALAUTO