VTK  9.3.0
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:
57 
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 
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:
169 
171  void ComputeProjectionVector(double vector[3], double origin[3]);
172 
177  double Vector[3];
178  double Origin[3];
179 
181  double FeatureAngle;
182 
185 
186  vtkPolyDataEdges* PreComp; // precomputed data for a given point of view
187 
188 private:
190  void operator=(const vtkPolyDataSilhouette&) = delete;
191 };
192 
193 VTK_ABI_NAMESPACE_END
194 #endif
a virtual camera for 3D rendering
Definition: vtkCamera.h:50
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.
sort polydata along camera view direction
void SetDirectionToSpecifiedVector()
Specify how view direction is computed.
void SetDirectionToCameraOrigin()
Specify how view direction is computed.
~vtkPolyDataSilhouette() override
vtkProp3D VTK_WRAP_EXTERN * GetProp3D()
Specify a transformation matrix (via the vtkProp3D::GetMatrix() method) that is used to include the e...
static vtkPolyDataSilhouette * New()
Instantiate object.
vtkPolyDataEdges * PreComp
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.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void ComputeProjectionVector(double vector[3], double origin[3])
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:48
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:59
@ vector
Definition: vtkX3D.h:237
int vtkTypeBool
Definition: vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270