VTK  9.4.20241218
vtkVisibilitySort.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright 2003 Sandia Corporation
3// SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
4
26#ifndef vtkVisibilitySort_h
27#define vtkVisibilitySort_h
28
29#include "vtkObject.h"
30#include "vtkRenderingCoreModule.h" // For export macro
31
32VTK_ABI_NAMESPACE_BEGIN
33class vtkIdTypeArray;
34class vtkDataSet;
35class vtkMatrix4x4;
36class vtkCamera;
37
38class VTKRENDERINGCORE_EXPORT vtkVisibilitySort : public vtkObject
39{
40public:
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
45
56 virtual void InitTraversal() = 0;
59
61
65 vtkSetClampMacro(MaxCellsReturned, int, 1, VTK_INT_MAX);
66 vtkGetMacro(MaxCellsReturned, int);
68
70
75 virtual void SetModelTransform(vtkMatrix4x4* mat);
76 vtkGetObjectMacro(ModelTransform, vtkMatrix4x4);
78
79 vtkGetObjectMacro(InverseModelTransform, vtkMatrix4x4);
80
82
85 virtual void SetCamera(vtkCamera* camera);
86 vtkGetObjectMacro(Camera, vtkCamera);
88
90
93 virtual void SetInput(vtkDataSet* data);
94 vtkGetObjectMacro(Input, vtkDataSet);
96
98
102 vtkGetMacro(Direction, int);
103 vtkSetMacro(Direction, int);
104 void SetDirectionToBackToFront() { this->SetDirection(BACK_TO_FRONT); }
105 void SetDirectionToFrontToBack() { this->SetDirection(FRONT_TO_BACK); }
107
108 enum
109 {
111 FRONT_TO_BACK
112 };
113
115
118 bool UsesGarbageCollector() const override { return true; }
120
121protected:
124
126
131
133
135
136 void ReportReferences(vtkGarbageCollector* collector) override;
137
138private:
139 vtkVisibilitySort(const vtkVisibilitySort&) = delete;
140 void operator=(const vtkVisibilitySort&) = delete;
141};
142
143VTK_ABI_NAMESPACE_END
144#endif // vtkVisibilitySort_h
a virtual camera for 3D rendering
Definition vtkCamera.h:151
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
Detect and break reference loops.
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition vtkIndent.h:108
represent and manipulate 4x4 transformation matrices
abstract base class for most VTK objects
Definition vtkObject.h:162
record modification and/or execution time
Abstract class that can sort cell data along a viewpoint.
void ReportReferences(vtkGarbageCollector *collector) override
~vtkVisibilitySort() override
virtual void SetCamera(vtkCamera *camera)
Set/Get the camera that specifies the viewing parameters.
vtkMatrix4x4 * ModelTransform
void SetDirectionToBackToFront()
Set/Get the sorting direction.
vtkTimeStamp LastSortTime
bool UsesGarbageCollector() const override
Overwritten to enable garbage collection.
virtual vtkIdTypeArray * GetNextCells()=0
To facilitate incremental sorting algorithms, the cells are retrieved in an iteration process.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMatrix4x4 * InverseModelTransform
virtual void InitTraversal()=0
To facilitate incremental sorting algorithms, the cells are retrieved in an iteration process.
virtual void SetInput(vtkDataSet *data)
Set/Get the data set containing the cells to sort.
void SetDirectionToFrontToBack()
Set/Get the sorting direction.
virtual void SetModelTransform(vtkMatrix4x4 *mat)
Set/Get the matrix that transforms from object space to world space.
#define VTK_INT_MAX
Definition vtkType.h:144