VTK  9.3.0
vtkDepthSortPolyData.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
31#ifndef vtkDepthSortPolyData_h
32#define vtkDepthSortPolyData_h
33
34#include "vtkFiltersHybridModule.h" // For export macro
36
37VTK_ABI_NAMESPACE_BEGIN
38class vtkCamera;
39class vtkProp3D;
40class vtkTransform;
41
42class VTKFILTERSHYBRID_EXPORT vtkDepthSortPolyData : public vtkPolyDataAlgorithm
43{
44public:
49
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52
54 {
55 VTK_DIRECTION_BACK_TO_FRONT = 0,
56 VTK_DIRECTION_FRONT_TO_BACK = 1,
57 VTK_DIRECTION_SPECIFIED_VECTOR = 2
58 };
59
61
65 vtkSetMacro(Direction, int);
66 vtkGetMacro(Direction, int);
67 void SetDirectionToFrontToBack() { this->SetDirection(VTK_DIRECTION_FRONT_TO_BACK); }
68 void SetDirectionToBackToFront() { this->SetDirection(VTK_DIRECTION_BACK_TO_FRONT); }
69 void SetDirectionToSpecifiedVector() { this->SetDirection(VTK_DIRECTION_SPECIFIED_VECTOR); }
71
73 {
74 VTK_SORT_FIRST_POINT = 0,
75 VTK_SORT_BOUNDS_CENTER = 1,
76 VTK_SORT_PARAMETRIC_CENTER = 2
77 };
78
80
86 vtkSetMacro(DepthSortMode, int);
87 vtkGetMacro(DepthSortMode, int);
88 void SetDepthSortModeToFirstPoint() { this->SetDepthSortMode(VTK_SORT_FIRST_POINT); }
89 void SetDepthSortModeToBoundsCenter() { this->SetDepthSortMode(VTK_SORT_BOUNDS_CENTER); }
90 void SetDepthSortModeToParametricCenter() { this->SetDepthSortMode(VTK_SORT_PARAMETRIC_CENTER); }
92
94
99 virtual void SetCamera(vtkCamera*);
100 vtkGetObjectMacro(Camera, vtkCamera);
102
110 vtkProp3D* GetProp3D() { return this->Prop3D; }
111
113
118 vtkSetVector3Macro(Vector, double);
119 vtkGetVectorMacro(Vector, double, 3);
121
123
129 vtkSetVector3Macro(Origin, double);
130 vtkGetVectorMacro(Origin, double, 3);
132
134
140 vtkSetMacro(SortScalars, vtkTypeBool);
141 vtkGetMacro(SortScalars, vtkTypeBool);
142 vtkBooleanMacro(SortScalars, vtkTypeBool);
144
150
151protected:
154
156 void ComputeProjectionVector(double direction[3], double origin[3]);
157
163 double Vector[3];
164 double Origin[3];
166
167private:
169 void operator=(const vtkDepthSortPolyData&) = delete;
170};
171
172VTK_ABI_NAMESPACE_END
173#endif
a virtual camera for 3D rendering
Definition vtkCamera.h:50
sort poly data along camera view direction
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetDirectionToBackToFront()
Specify the sort method for the polygonal primitives.
virtual void SetCamera(vtkCamera *)
Specify a camera that is used to define a view direction along which the cells are sorted.
void SetDirectionToFrontToBack()
Specify the sort method for the polygonal primitives.
void SetDepthSortModeToParametricCenter()
Specify the point to use when sorting.
vtkMTimeType GetMTime() override
Return MTime also considering the dependent objects: the camera and/or the prop3D.
void SetDepthSortModeToBoundsCenter()
Specify the point to use when sorting.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetDepthSortModeToFirstPoint()
Specify the point to use when sorting.
~vtkDepthSortPolyData() override
void ComputeProjectionVector(double direction[3], double origin[3])
void SetDirectionToSpecifiedVector()
Specify the sort method for the polygonal primitives.
void SetProp3D(vtkProp3D *)
Specify a transformation matrix (via the vtkProp3D::GetMatrix() method) that is used to include the e...
static vtkDepthSortPolyData * New()
Instantiate object.
a simple class to control print indentation
Definition vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
represents an 3D object for placement in a rendered scene
Definition vtkProp3D.h:48
describes linear transformations via a 4x4 matrix
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270