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
52class vtkIdTypeArray;
53class vtkDataSet;
54class vtkMatrix4x4;
55class vtkCamera;
56
57class VTKRENDERINGCORE_EXPORT vtkVisibilitySort : public vtkObject
58{
59public:
61 virtual void PrintSelf(ostream &os, vtkIndent indent);
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 { BACK_TO_FRONT, FRONT_TO_BACK };
128
130
133 void Register(vtkObjectBase *o) VTK_OVERRIDE;
134 void UnRegister(vtkObjectBase *o) VTK_OVERRIDE;
136
137protected:
140
142
147
149
151
152 void ReportReferences(vtkGarbageCollector *collector) VTK_OVERRIDE;
153
154private:
155 vtkVisibilitySort(const vtkVisibilitySort &) VTK_DELETE_FUNCTION;
156 void operator=(const vtkVisibilitySort &) VTK_DELETE_FUNCTION;
157};
158
159#endif //vtkVisibilitySort_h
160
a virtual camera for 3D rendering
Definition: vtkCamera.h:51
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
Detect and break reference loops.
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition: vtkIndent.h:40
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:42
abstract base class for most VTK objects
Definition: vtkObjectBase.h:66
abstract base class for most VTK objects
Definition: vtkObject.h:60
record modification and/or execution time
Definition: vtkTimeStamp.h:36
Abstract class that can sort cell data along a viewpoint.
void ReportReferences(vtkGarbageCollector *collector) override
virtual void SetCamera(vtkCamera *camera)
Set/Get the camera that specifies the viewing parameters.
virtual ~vtkVisibilitySort()
vtkMatrix4x4 * ModelTransform
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void Register(vtkObjectBase *o) override
Overwritten to enable garbage collection.
vtkTimeStamp LastSortTime
virtual vtkIdTypeArray * GetNextCells()=0
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
Decrease the reference count (release by another object).
virtual void SetModelTransform(vtkMatrix4x4 *mat)
Set/Get the matrix that transforms from object space to world space.
@ data
Definition: vtkX3D.h:315
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
#define VTK_INT_MAX
Definition: vtkType.h:153