VTK  9.7.1
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 
33 VTK_ABI_NAMESPACE_BEGIN
34 class vtkIdTypeArray;
35 class vtkDataSet;
36 class vtkMatrix4x4;
37 class vtkCamera;
38 
39 class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkVisibilitySort : public vtkObject
40 {
41 public:
42  vtkTypeMacro(vtkVisibilitySort, vtkObject);
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
57  virtual void InitTraversal() = 0;
58  virtual vtkIdTypeArray* GetNextCells() = 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 
122 protected:
124  ~vtkVisibilitySort() override;
125 
127 
132 
134 
136 
137  void ReportReferences(vtkGarbageCollector* collector) override;
138 
139 private:
140  vtkVisibilitySort(const vtkVisibilitySort&) = delete;
141  void operator=(const vtkVisibilitySort&) = delete;
142 };
143 
144 VTK_ABI_NAMESPACE_END
145 #endif // vtkVisibilitySort_h
void SetDirectionToFrontToBack()
Set/Get the sorting direction.
abstract base class for most VTK objects
Definition: vtkObject.h:52
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:31
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
Abstract class that can sort cell data along a viewpoint.
#define VTK_INT_MAX
Definition: vtkType.h:192
record modification and/or execution time
Definition: vtkTimeStamp.h:24
void SetDirectionToBackToFront()
Set/Get the sorting direction.
dynamic, self-adjusting array of vtkIdType
Detect and break reference loops.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual void ReportReferences(vtkGarbageCollector *)
a virtual camera for 3D rendering
Definition: vtkCamera.h:41
bool UsesGarbageCollector() const override
Overwritten to enable garbage collection.
vtkTimeStamp LastSortTime
vtkMatrix4x4 * InverseModelTransform
vtkMatrix4x4 * ModelTransform
#define VTK_MARSHALAUTO