VTK
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 "vtkRenderingCoreModule.h" // For export macro
50 #include "vtkObject.h"
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  virtual void PrintSelf(ostream &os, vtkIndent indent);
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 { BACK_TO_FRONT, FRONT_TO_BACK };
128 
130 
133  void Register(vtkObjectBase *o) VTK_OVERRIDE;
134  void UnRegister(vtkObjectBase *o) VTK_OVERRIDE;
136 
137 protected:
139  virtual ~vtkVisibilitySort();
140 
142 
147 
149 
151 
152  void ReportReferences(vtkGarbageCollector *collector) VTK_OVERRIDE;
153 
154 private:
155  vtkVisibilitySort(const vtkVisibilitySort &) VTK_DELETE_FUNCTION;
156  void operator=(const vtkVisibilitySort &) VTK_DELETE_FUNCTION;
157 };
158 
159 #endif //vtkVisibilitySort_h
160 
void SetDirectionToFrontToBack()
Set/Get the sorting direction.
abstract base class for most VTK objects
Definition: vtkObject.h:59
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:41
virtual void Register(vtkObjectBase *o)
Increase the reference count (mark as used by another object).
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:62
Abstract class that can sort cell data along a viewpoint.
#define VTK_INT_MAX
Definition: vtkType.h:153
record modification and/or execution time
Definition: vtkTimeStamp.h:35
void SetDirectionToBackToFront()
Set/Get the sorting direction.
dynamic, self-adjusting array of vtkIdType
Detect and break reference loops.
virtual void UnRegister(vtkObjectBase *o)
Decrease the reference count (release by another object).
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void ReportReferences(vtkGarbageCollector *)
a virtual camera for 3D rendering
Definition: vtkCamera.h:50
vtkTimeStamp LastSortTime
abstract base class for most VTK objects
Definition: vtkObjectBase.h:65
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkMatrix4x4 * InverseModelTransform
vtkMatrix4x4 * ModelTransform