VTK: Filters/Hybrid/vtkDepthSortPolyData.h Source File

| VTK 9.3.1

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
35 #include "vtkPolyDataAlgorithm.h"
36
37 VTK_ABI_NAMESPACE_BEGIN
38 class vtkCamera;
39 class vtkProp3D;
40 class vtkTransform;
41
42 class VTKFILTERSHYBRID_EXPORT vtkDepthSortPolyData : public vtkPolyDataAlgorithm
43 {
44 public:
48 static vtkDepthSortPolyData* New();
49
50 vtkTypeMacro(vtkDepthSortPolyData, vtkPolyDataAlgorithm);
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52
53 enum Directions
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
72 enum SortMode
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
109 void SetProp3D(vtkProp3D*);
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
149 vtkMTimeType GetMTime() override;
150
151 protected:
152 vtkDepthSortPolyData();
153 ~vtkDepthSortPolyData() override;
154
155 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
156 void ComputeProjectionVector(double direction[3], double origin[3]);
157
158 int Direction;
159 int DepthSortMode;
160 vtkCamera* Camera;
161 vtkProp3D* Prop3D;
162 vtkTransform* Transform;
163 double Vector[3];
164 double Origin[3];
165 vtkTypeBool SortScalars;
166
167 private:
168 vtkDepthSortPolyData(const vtkDepthSortPolyData&) = delete;
169 void operator=(const vtkDepthSortPolyData&) = delete;
170 };
171
172 VTK_ABI_NAMESPACE_END
173 #endif
vtkCamera
a virtual camera for 3D rendering
Definition: vtkCamera.h:50
vtkDepthSortPolyData
sort poly data along camera view direction
Definition: vtkDepthSortPolyData.h:43
vtkDepthSortPolyData::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkDepthSortPolyData::SetDirectionToBackToFront
void SetDirectionToBackToFront()
Specify the sort method for the polygonal primitives.
Definition: vtkDepthSortPolyData.h:68
vtkDepthSortPolyData::SetCamera
virtual void SetCamera(vtkCamera *)
Specify a camera that is used to define a view direction along which the cells are sorted.
vtkDepthSortPolyData::SetDirectionToFrontToBack
void SetDirectionToFrontToBack()
Specify the sort method for the polygonal primitives.
Definition: vtkDepthSortPolyData.h:67
vtkDepthSortPolyData::SetDepthSortModeToParametricCenter
void SetDepthSortModeToParametricCenter()
Specify the point to use when sorting.
Definition: vtkDepthSortPolyData.h:90
vtkDepthSortPolyData::GetMTime
vtkMTimeType GetMTime() override
Return MTime also considering the dependent objects: the camera and/or the prop3D.
vtkDepthSortPolyData::DepthSortMode
int DepthSortMode
Definition: vtkDepthSortPolyData.h:159
vtkDepthSortPolyData::SetDepthSortModeToBoundsCenter
void SetDepthSortModeToBoundsCenter()
Specify the point to use when sorting.
Definition: vtkDepthSortPolyData.h:89
vtkDepthSortPolyData::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDepthSortPolyData::SetDepthSortModeToFirstPoint
void SetDepthSortModeToFirstPoint()
Specify the point to use when sorting.
Definition: vtkDepthSortPolyData.h:88
vtkDepthSortPolyData::~vtkDepthSortPolyData
~vtkDepthSortPolyData() override
vtkDepthSortPolyData::ComputeProjectionVector
void ComputeProjectionVector(double direction[3], double origin[3])
vtkDepthSortPolyData::Directions
Directions
Definition: vtkDepthSortPolyData.h:54
vtkDepthSortPolyData::SetDirectionToSpecifiedVector
void SetDirectionToSpecifiedVector()
Specify the sort method for the polygonal primitives.
Definition: vtkDepthSortPolyData.h:69
vtkDepthSortPolyData::SortMode
SortMode
Definition: vtkDepthSortPolyData.h:73
vtkDepthSortPolyData::New
static vtkDepthSortPolyData * New()
Instantiate object.
vtkDepthSortPolyData::Camera
vtkCamera * Camera
Definition: vtkDepthSortPolyData.h:160
vtkDepthSortPolyData::vtkDepthSortPolyData
vtkDepthSortPolyData()
vtkDepthSortPolyData::SetProp3D
void SetProp3D(vtkProp3D *)
Specify a transformation matrix (via the vtkProp3D::GetMatrix() method) that is used to include the e...
vtkDepthSortPolyData::Prop3D
vtkProp3D * Prop3D
Definition: vtkDepthSortPolyData.h:161
vtkDepthSortPolyData::GetProp3D
vtkProp3D * GetProp3D()
Definition: vtkDepthSortPolyData.h:110
vtkDepthSortPolyData::Transform
vtkTransform * Transform
Definition: vtkDepthSortPolyData.h:162
vtkDepthSortPolyData::Direction
int Direction
Definition: vtkDepthSortPolyData.h:158
vtkDepthSortPolyData::SortScalars
vtkTypeBool SortScalars
Definition: vtkDepthSortPolyData.h:165
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:43
vtkProp3D
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:48
vtkTransform
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:59
vtkX3D::direction
@ direction
Definition: vtkX3D.h:260
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkPolyDataAlgorithm.h
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270