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
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:
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:
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
a virtual camera for 3D rendering
Definition: vtkCamera.h:41
a simple class to control print indentation
Definition: vtkIndent.h:29
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:39
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:50
@ vector
Definition: vtkX3D.h:237
int vtkTypeBool
Definition: vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270