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
29 #ifndef vtkPolyDataSilhouette_h
30 #define vtkPolyDataSilhouette_h
31 
32 #include "vtkFiltersHybridModule.h" // For export macro
33 #include "vtkPolyDataAlgorithm.h"
34 
35 VTK_ABI_NAMESPACE_BEGIN
36 class vtkCamera;
37 class vtkProp3D;
38 class vtkTransform;
39 class vtkPolyDataEdges;
40 
41 class VTKFILTERSHYBRID_EXPORT vtkPolyDataSilhouette : public vtkPolyDataAlgorithm
42 {
43 public:
47  static vtkPolyDataSilhouette* New();
48 
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
53 
56  vtkSetMacro(EnableFeatureAngle, int);
57  vtkGetMacro(EnableFeatureAngle, int);
59 
61 
64  vtkSetMacro(FeatureAngle, double);
65  vtkGetMacro(FeatureAngle, double);
67 
69 
73  vtkSetMacro(BorderEdges, vtkTypeBool);
74  vtkGetMacro(BorderEdges, vtkTypeBool);
75  vtkBooleanMacro(BorderEdges, vtkTypeBool);
77 
79 
83  vtkSetMacro(PieceInvariant, vtkTypeBool);
84  vtkGetMacro(PieceInvariant, vtkTypeBool);
85  vtkBooleanMacro(PieceInvariant, vtkTypeBool);
87 
89  {
90  VTK_DIRECTION_SPECIFIED_VECTOR = 0,
91  VTK_DIRECTION_SPECIFIED_ORIGIN = 1,
92  VTK_DIRECTION_CAMERA_ORIGIN = 2,
93  VTK_DIRECTION_CAMERA_VECTOR = 3
94  };
95 
97 
101  vtkSetMacro(Direction, int);
102  vtkGetMacro(Direction, int);
103  void SetDirectionToSpecifiedVector() { this->SetDirection(VTK_DIRECTION_SPECIFIED_VECTOR); }
104  void SetDirectionToSpecifiedOrigin() { this->SetDirection(VTK_DIRECTION_SPECIFIED_ORIGIN); }
105  void SetDirectionToCameraVector() { this->SetDirection(VTK_DIRECTION_CAMERA_VECTOR); }
106  void SetDirectionToCameraOrigin() { this->SetDirection(VTK_DIRECTION_CAMERA_ORIGIN); }
108 
110 
115  virtual void SetCamera(vtkCamera VTK_WRAP_EXTERN*);
116  vtkGetObjectMacro(Camera, vtkCamera VTK_WRAP_EXTERN);
118 
120 
127  void SetProp3D(vtkProp3D VTK_WRAP_EXTERN*);
128  vtkProp3D VTK_WRAP_EXTERN* GetProp3D();
130 
132 
137  vtkSetVector3Macro(Vector, double);
138  vtkGetVectorMacro(Vector, double, 3);
140 
142 
147  vtkSetVector3Macro(Origin, double);
148  vtkGetVectorMacro(Origin, double, 3);
150 
155  vtkMTimeType GetMTime() override;
156 
157 protected:
159  ~vtkPolyDataSilhouette() override;
160 
162  void ComputeProjectionVector(double vector[3], double origin[3]);
163 
168  double Vector[3];
169  double Origin[3];
170 
172  double FeatureAngle;
173 
176 
177  vtkPolyDataEdges* PreComp; // precomputed data for a given point of view
178 
179 private:
181  void operator=(const vtkPolyDataSilhouette&) = delete;
182 };
183 
184 VTK_ABI_NAMESPACE_END
185 #endif
void SetDirectionToCameraVector()
Specify how view direction is computed.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:49
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:38
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:64
void SetDirectionToSpecifiedVector()
Specify how view direction is computed.
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
void SetDirectionToSpecifiedOrigin()
Specify how view direction is computed.
a virtual camera for 3D rendering
Definition: vtkCamera.h:40
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkPolyDataEdges * PreComp
sort polydata along camera view direction
void SetDirectionToCameraOrigin()
Specify how view direction is computed.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.