VTK  9.3.20240424
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
58#ifndef vtkPolyDataSilhouette_h
59#define vtkPolyDataSilhouette_h
60
61#include "vtkFiltersHybridModule.h" // For export macro
63
64VTK_ABI_NAMESPACE_BEGIN
65class vtkCamera;
66class vtkProp3D;
67class vtkTransform;
68class vtkPolyDataEdges;
69
70class VTKFILTERSHYBRID_EXPORT vtkPolyDataSilhouette : public vtkPolyDataAlgorithm
71{
72public:
77
79 void PrintSelf(ostream& os, vtkIndent indent) override;
80
82
85 vtkSetMacro(EnableFeatureAngle, int);
86 vtkGetMacro(EnableFeatureAngle, int);
88
90
93 vtkSetMacro(FeatureAngle, double);
94 vtkGetMacro(FeatureAngle, double);
96
98
102 vtkSetMacro(BorderEdges, vtkTypeBool);
103 vtkGetMacro(BorderEdges, vtkTypeBool);
104 vtkBooleanMacro(BorderEdges, vtkTypeBool);
106
108
112 vtkSetMacro(PieceInvariant, vtkTypeBool);
113 vtkGetMacro(PieceInvariant, vtkTypeBool);
114 vtkBooleanMacro(PieceInvariant, vtkTypeBool);
116
118 {
119 VTK_DIRECTION_SPECIFIED_VECTOR = 0,
120 VTK_DIRECTION_SPECIFIED_ORIGIN = 1,
121 VTK_DIRECTION_CAMERA_ORIGIN = 2,
122 VTK_DIRECTION_CAMERA_VECTOR = 3
123 };
124
126
130 vtkSetMacro(Direction, int);
131 vtkGetMacro(Direction, int);
132 void SetDirectionToSpecifiedVector() { this->SetDirection(VTK_DIRECTION_SPECIFIED_VECTOR); }
133 void SetDirectionToSpecifiedOrigin() { this->SetDirection(VTK_DIRECTION_SPECIFIED_ORIGIN); }
134 void SetDirectionToCameraVector() { this->SetDirection(VTK_DIRECTION_CAMERA_VECTOR); }
135 void SetDirectionToCameraOrigin() { this->SetDirection(VTK_DIRECTION_CAMERA_ORIGIN); }
137
139
144 virtual void SetCamera(vtkCamera VTK_WRAP_EXTERN*);
145 vtkGetObjectMacro(Camera, vtkCamera VTK_WRAP_EXTERN);
147
149
156 void SetProp3D(vtkProp3D VTK_WRAP_EXTERN*);
157 vtkProp3D VTK_WRAP_EXTERN* GetProp3D();
159
161
166 vtkSetVector3Macro(Vector, double);
167 vtkGetVectorMacro(Vector, double, 3);
169
171
176 vtkSetVector3Macro(Origin, double);
177 vtkGetVectorMacro(Origin, double, 3);
179
185
186protected:
189
191 void ComputeProjectionVector(double vector[3], double origin[3]);
192
197 double Vector[3];
198 double Origin[3];
199
202
205
206 vtkPolyDataEdges* PreComp; // precomputed data for a given point of view
207
208private:
210 void operator=(const vtkPolyDataSilhouette&) = delete;
211};
212
213VTK_ABI_NAMESPACE_END
214#endif
a virtual camera for 3D rendering
Definition vtkCamera.h:151
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
sort polydata along camera view direction
void SetDirectionToSpecifiedVector()
Specify how view direction is computed.
void SetDirectionToCameraOrigin()
Specify how view direction is computed.
~vtkPolyDataSilhouette() override
void SetDirectionToCameraVector()
Specify how view direction is computed.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetProp3D(vtkProp3D VTK_WRAP_EXTERN *)
Specify a transformation matrix (via the vtkProp3D::GetMatrix() method) that is used to include the e...
vtkMTimeType GetMTime() override
Return MTime also considering the dependent objects: the camera and/or the prop3D.
vtkProp3D VTK_WRAP_EXTERN * GetProp3D()
Specify a transformation matrix (via the vtkProp3D::GetMatrix() method) that is used to include the e...
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void ComputeProjectionVector(double vector[3], double origin[3])
static vtkPolyDataSilhouette * New()
Instantiate object.
void SetDirectionToSpecifiedOrigin()
Specify how view direction is computed.
virtual void SetCamera(vtkCamera VTK_WRAP_EXTERN *)
Specify a camera that is used to define the view direction.
represents an 3D object for placement in a rendered scene
Definition vtkProp3D.h:89
describes linear transformations via a 4x4 matrix
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270