VTK  9.5.20250607
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
32
33VTK_ABI_NAMESPACE_BEGIN
34class vtkIdTypeArray;
35class vtkDataSet;
36class vtkMatrix4x4;
37class vtkCamera;
38
39class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkVisibilitySort : public vtkObject
40{
41public:
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
46
57 virtual void InitTraversal() = 0;
60
62
66 vtkSetClampMacro(MaxCellsReturned, int, 1, VTK_INT_MAX);
67 vtkGetMacro(MaxCellsReturned, int);
69
71
76 virtual void SetModelTransform(vtkMatrix4x4* mat);
77 vtkGetObjectMacro(ModelTransform, vtkMatrix4x4);
79
80 vtkGetObjectMacro(InverseModelTransform, vtkMatrix4x4);
81
83
86 virtual void SetCamera(vtkCamera* camera);
87 vtkGetObjectMacro(Camera, vtkCamera);
89
91
94 virtual void SetInput(vtkDataSet* data);
95 vtkGetObjectMacro(Input, vtkDataSet);
97
99
103 vtkGetMacro(Direction, int);
104 vtkSetMacro(Direction, int);
105 void SetDirectionToBackToFront() { this->SetDirection(BACK_TO_FRONT); }
106 void SetDirectionToFrontToBack() { this->SetDirection(FRONT_TO_BACK); }
108
109 enum
110 {
112 FRONT_TO_BACK
113 };
114
116
119 bool UsesGarbageCollector() const override { return true; }
121
122protected:
125
127
132
134
136
137 void ReportReferences(vtkGarbageCollector* collector) override;
138
139private:
140 vtkVisibilitySort(const vtkVisibilitySort&) = delete;
141 void operator=(const vtkVisibilitySort&) = delete;
142};
143
144VTK_ABI_NAMESPACE_END
145#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:161
#define VTK_MARSHALAUTO