VTK: Filters/Hybrid/vtkPolyDataSilhouette.h Source File

| VTK 9.3.1

vtkPolyDataSilhouette.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
38 #ifndef vtkPolyDataSilhouette_h
39 #define vtkPolyDataSilhouette_h
40
41 #include "vtkFiltersHybridModule.h" // For export macro
42 #include "vtkPolyDataAlgorithm.h"
43
44 VTK_ABI_NAMESPACE_BEGIN
45 class vtkCamera;
46 class vtkProp3D;
47 class vtkTransform;
48 class vtkPolyDataEdges;
49
50 class VTKFILTERSHYBRID_EXPORT vtkPolyDataSilhouette : public vtkPolyDataAlgorithm
51 {
52 public:
56 static vtkPolyDataSilhouette* New();
57
58 vtkTypeMacro(vtkPolyDataSilhouette, vtkPolyDataAlgorithm);
59 void PrintSelf(ostream& os, vtkIndent indent) override;
60
62
65 vtkSetMacro(EnableFeatureAngle, int);
66 vtkGetMacro(EnableFeatureAngle, int);
68
70
73 vtkSetMacro(FeatureAngle, double);
74 vtkGetMacro(FeatureAngle, double);
76
78
82 vtkSetMacro(BorderEdges, vtkTypeBool);
83 vtkGetMacro(BorderEdges, vtkTypeBool);
84 vtkBooleanMacro(BorderEdges, vtkTypeBool);
86
88
92 vtkSetMacro(PieceInvariant, vtkTypeBool);
93 vtkGetMacro(PieceInvariant, vtkTypeBool);
94 vtkBooleanMacro(PieceInvariant, vtkTypeBool);
96
97 enum Directions
98 {
99 VTK_DIRECTION_SPECIFIED_VECTOR = 0,
100 VTK_DIRECTION_SPECIFIED_ORIGIN = 1,
101 VTK_DIRECTION_CAMERA_ORIGIN = 2,
102 VTK_DIRECTION_CAMERA_VECTOR = 3
103 };
104
106
110 vtkSetMacro(Direction, int);
111 vtkGetMacro(Direction, int);
112 void SetDirectionToSpecifiedVector() { this->SetDirection(VTK_DIRECTION_SPECIFIED_VECTOR); }
113 void SetDirectionToSpecifiedOrigin() { this->SetDirection(VTK_DIRECTION_SPECIFIED_ORIGIN); }
114 void SetDirectionToCameraVector() { this->SetDirection(VTK_DIRECTION_CAMERA_VECTOR); }
115 void SetDirectionToCameraOrigin() { this->SetDirection(VTK_DIRECTION_CAMERA_ORIGIN); }
117
119
124 virtual void SetCamera(vtkCamera VTK_WRAP_EXTERN*);
125 vtkGetObjectMacro(Camera, vtkCamera VTK_WRAP_EXTERN);
127
129
136 void SetProp3D(vtkProp3D VTK_WRAP_EXTERN*);
137 vtkProp3D VTK_WRAP_EXTERN* GetProp3D();
139
141
146 vtkSetVector3Macro(Vector, double);
147 vtkGetVectorMacro(Vector, double, 3);
149
151
156 vtkSetVector3Macro(Origin, double);
157 vtkGetVectorMacro(Origin, double, 3);
159
164 vtkMTimeType GetMTime() override;
165
166 protected:
167 vtkPolyDataSilhouette();
168 ~vtkPolyDataSilhouette() override;
169
170 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
171 void ComputeProjectionVector(double vector[3], double origin[3]);
172
173 int Direction;
174 vtkCamera* Camera;
175 vtkProp3D* Prop3D;
176 vtkTransform* Transform;
177 double Vector[3];
178 double Origin[3];
179
180 int EnableFeatureAngle;
181 double FeatureAngle;
182
183 vtkTypeBool BorderEdges;
184 vtkTypeBool PieceInvariant;
185
186 vtkPolyDataEdges* PreComp; // precomputed data for a given point of view
187
188 private:
189 vtkPolyDataSilhouette(const vtkPolyDataSilhouette&) = delete;
190 void operator=(const vtkPolyDataSilhouette&) = delete;
191 };
192
193 VTK_ABI_NAMESPACE_END
194 #endif
vtkCamera
a virtual camera for 3D rendering
Definition: vtkCamera.h:50
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
vtkPolyDataSilhouette
sort polydata along camera view direction
Definition: vtkPolyDataSilhouette.h:51
vtkPolyDataSilhouette::SetDirectionToSpecifiedVector
void SetDirectionToSpecifiedVector()
Specify how view direction is computed.
Definition: vtkPolyDataSilhouette.h:112
vtkPolyDataSilhouette::Transform
vtkTransform * Transform
Definition: vtkPolyDataSilhouette.h:176
vtkPolyDataSilhouette::Direction
int Direction
Definition: vtkPolyDataSilhouette.h:173
vtkPolyDataSilhouette::SetDirectionToCameraOrigin
void SetDirectionToCameraOrigin()
Specify how view direction is computed.
Definition: vtkPolyDataSilhouette.h:115
vtkPolyDataSilhouette::~vtkPolyDataSilhouette
~vtkPolyDataSilhouette() override
vtkPolyDataSilhouette::GetProp3D
vtkProp3D VTK_WRAP_EXTERN * GetProp3D()
Specify a transformation matrix (via the vtkProp3D::GetMatrix() method) that is used to include the e...
vtkPolyDataSilhouette::New
static vtkPolyDataSilhouette * New()
Instantiate object.
vtkPolyDataSilhouette::PieceInvariant
vtkTypeBool PieceInvariant
Definition: vtkPolyDataSilhouette.h:184
vtkPolyDataSilhouette::PreComp
vtkPolyDataEdges * PreComp
Definition: vtkPolyDataSilhouette.h:186
vtkPolyDataSilhouette::SetDirectionToCameraVector
void SetDirectionToCameraVector()
Specify how view direction is computed.
Definition: vtkPolyDataSilhouette.h:114
vtkPolyDataSilhouette::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataSilhouette::SetProp3D
void SetProp3D(vtkProp3D VTK_WRAP_EXTERN *)
Specify a transformation matrix (via the vtkProp3D::GetMatrix() method) that is used to include the e...
vtkPolyDataSilhouette::Directions
Directions
Definition: vtkPolyDataSilhouette.h:98
vtkPolyDataSilhouette::GetMTime
vtkMTimeType GetMTime() override
Return MTime also considering the dependent objects: the camera and/or the prop3D.
vtkPolyDataSilhouette::Prop3D
vtkProp3D * Prop3D
Definition: vtkPolyDataSilhouette.h:175
vtkPolyDataSilhouette::FeatureAngle
double FeatureAngle
Definition: vtkPolyDataSilhouette.h:181
vtkPolyDataSilhouette::BorderEdges
vtkTypeBool BorderEdges
Definition: vtkPolyDataSilhouette.h:183
vtkPolyDataSilhouette::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkPolyDataSilhouette::ComputeProjectionVector
void ComputeProjectionVector(double vector[3], double origin[3])
vtkPolyDataSilhouette::SetDirectionToSpecifiedOrigin
void SetDirectionToSpecifiedOrigin()
Specify how view direction is computed.
Definition: vtkPolyDataSilhouette.h:113
vtkPolyDataSilhouette::EnableFeatureAngle
int EnableFeatureAngle
Definition: vtkPolyDataSilhouette.h:180
vtkPolyDataSilhouette::Camera
vtkCamera * Camera
Definition: vtkPolyDataSilhouette.h:174
vtkPolyDataSilhouette::vtkPolyDataSilhouette
vtkPolyDataSilhouette()
vtkPolyDataSilhouette::SetCamera
virtual void SetCamera(vtkCamera VTK_WRAP_EXTERN *)
Specify a camera that is used to define the view direction.
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::vector
@ vector
Definition: vtkX3D.h:237
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkPolyDataAlgorithm.h
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270