VTK  9.1.0
vtkVisibilitySort.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkVisibilitySort.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=========================================================================*/
15
16/*
17 * Copyright 2003 Sandia Corporation.
18 * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
19 * license for use of this work by or on behalf of the
20 * U.S. Government. Redistribution and use in source and binary forms, with
21 * or without modification, are permitted provided that this Notice and any
22 * statement of authorship are reproduced on all copies.
23 */
24
46#ifndef vtkVisibilitySort_h
47#define vtkVisibilitySort_h
48
49#include "vtkObject.h"
50#include "vtkRenderingCoreModule.h" // For export macro
51
52class vtkIdTypeArray;
53class vtkDataSet;
54class vtkMatrix4x4;
55class vtkCamera;
56
57class VTKRENDERINGCORE_EXPORT vtkVisibilitySort : public vtkObject
58{
59public:
61 void PrintSelf(ostream& os, vtkIndent indent) override;
62
64
75 virtual void InitTraversal() = 0;
78
80
84 vtkSetClampMacro(MaxCellsReturned, int, 1, VTK_INT_MAX);
85 vtkGetMacro(MaxCellsReturned, int);
87
89
94 virtual void SetModelTransform(vtkMatrix4x4* mat);
95 vtkGetObjectMacro(ModelTransform, vtkMatrix4x4);
97
98 vtkGetObjectMacro(InverseModelTransform, vtkMatrix4x4);
99
101
104 virtual void SetCamera(vtkCamera* camera);
105 vtkGetObjectMacro(Camera, vtkCamera);
107
109
112 virtual void SetInput(vtkDataSet* data);
113 vtkGetObjectMacro(Input, vtkDataSet);
115
117
121 vtkGetMacro(Direction, int);
122 vtkSetMacro(Direction, int);
123 void SetDirectionToBackToFront() { this->SetDirection(BACK_TO_FRONT); }
124 void SetDirectionToFrontToBack() { this->SetDirection(FRONT_TO_BACK); }
126
127 enum
128 {
130 FRONT_TO_BACK
131 };
132
134
137 void Register(vtkObjectBase* o) override;
138 void UnRegister(vtkObjectBase* o) override;
140
141protected:
144
146
151
153
155
156 void ReportReferences(vtkGarbageCollector* collector) override;
157
158private:
159 vtkVisibilitySort(const vtkVisibilitySort&) = delete;
160 void operator=(const vtkVisibilitySort&) = delete;
161};
162
163#endif // vtkVisibilitySort_h
a virtual camera for 3D rendering
Definition: vtkCamera.h:155
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
Detect and break reference loops.
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition: vtkIndent.h:113
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:145
abstract base class for most VTK objects
Definition: vtkObjectBase.h:70
abstract base class for most VTK objects
Definition: vtkObject.h:73
record modification and/or execution time
Definition: vtkTimeStamp.h:52
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 Register(vtkObjectBase *o) override
Overwritten to enable garbage collection.
void SetDirectionToBackToFront()
Set/Get the sorting direction.
vtkTimeStamp LastSortTime
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 UnRegister(vtkObjectBase *o) override
Overwritten to enable garbage collection.
void SetDirectionToFrontToBack()
Set/Get the sorting direction.
virtual void SetModelTransform(vtkMatrix4x4 *mat)
Set/Get the matrix that transforms from object space to world space.
@ data
Definition: vtkX3D.h:321
#define VTK_INT_MAX
Definition: vtkType.h:155