VTK  9.0.1
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 
52 class vtkIdTypeArray;
53 class vtkDataSet;
54 class vtkMatrix4x4;
55 class vtkCamera;
56 
57 class VTKRENDERINGCORE_EXPORT vtkVisibilitySort : public vtkObject
58 {
59 public:
60  vtkTypeMacro(vtkVisibilitySort, vtkObject);
61  void PrintSelf(ostream& os, vtkIndent indent) override;
62 
64 
75  virtual void InitTraversal() = 0;
76  virtual vtkIdTypeArray* GetNextCells() = 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 
141 protected:
143  ~vtkVisibilitySort() override;
144 
146 
151 
153 
155 
156  void ReportReferences(vtkGarbageCollector* collector) override;
157 
158 private:
159  vtkVisibilitySort(const vtkVisibilitySort&) = delete;
160  void operator=(const vtkVisibilitySort&) = delete;
161 };
162 
163 #endif // vtkVisibilitySort_h
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:155
vtkVisibilitySort::Direction
int Direction
Definition: vtkVisibilitySort.h:154
vtkVisibilitySort::Camera
vtkCamera * Camera
Definition: vtkVisibilitySort.h:149
vtkObjectBase::Register
virtual void Register(vtkObjectBase *o)
Increase the reference count (mark as used by another object).
vtkX3D::data
@ data
Definition: vtkX3D.h:321
vtkObjectBase::ReportReferences
virtual void ReportReferences(vtkGarbageCollector *)
vtkVisibilitySort::SetDirectionToFrontToBack
void SetDirectionToFrontToBack()
Definition: vtkVisibilitySort.h:124
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:32
vtkVisibilitySort::Input
vtkDataSet * Input
Definition: vtkVisibilitySort.h:150
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkVisibilitySort::BACK_TO_FRONT
@ BACK_TO_FRONT
Definition: vtkVisibilitySort.h:129
vtkVisibilitySort::SetDirectionToBackToFront
void SetDirectionToBackToFront()
Definition: vtkVisibilitySort.h:123
vtkObjectBase
abstract base class for most VTK objects
Definition: vtkObjectBase.h:63
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:35
vtkCamera
a virtual camera for 3D rendering
Definition: vtkCamera.h:45
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGarbageCollector
Detect and break reference loops.
Definition: vtkGarbageCollector.h:94
vtkObject.h
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
vtkVisibilitySort::LastSortTime
vtkTimeStamp LastSortTime
Definition: vtkVisibilitySort.h:145
vtkVisibilitySort
Abstract class that can sort cell data along a viewpoint.
Definition: vtkVisibilitySort.h:57
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:35
vtkVisibilitySort::InverseModelTransform
vtkMatrix4x4 * InverseModelTransform
Definition: vtkVisibilitySort.h:148
vtkVisibilitySort::MaxCellsReturned
int MaxCellsReturned
Definition: vtkVisibilitySort.h:152
vtkVisibilitySort::ModelTransform
vtkMatrix4x4 * ModelTransform
Definition: vtkVisibilitySort.h:147
vtkObjectBase::UnRegister
virtual void UnRegister(vtkObjectBase *o)
Decrease the reference count (release by another object).