VTK  9.2.6
vtkPolyDataSilhouette.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPolyDataSilhouette.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
41 #ifndef vtkPolyDataSilhouette_h
42 #define vtkPolyDataSilhouette_h
43 
44 #include "vtkFiltersHybridModule.h" // For export macro
45 #include "vtkPolyDataAlgorithm.h"
46 
47 class vtkCamera;
48 class vtkProp3D;
49 class vtkTransform;
50 class vtkPolyDataEdges;
51 
52 class VTKFILTERSHYBRID_EXPORT vtkPolyDataSilhouette : public vtkPolyDataAlgorithm
53 {
54 public:
58  static vtkPolyDataSilhouette* New();
59 
61  void PrintSelf(ostream& os, vtkIndent indent) override;
62 
64 
67  vtkSetMacro(EnableFeatureAngle, int);
68  vtkGetMacro(EnableFeatureAngle, int);
70 
72 
75  vtkSetMacro(FeatureAngle, double);
76  vtkGetMacro(FeatureAngle, double);
78 
80 
84  vtkSetMacro(BorderEdges, vtkTypeBool);
85  vtkGetMacro(BorderEdges, vtkTypeBool);
86  vtkBooleanMacro(BorderEdges, vtkTypeBool);
88 
90 
94  vtkSetMacro(PieceInvariant, vtkTypeBool);
95  vtkGetMacro(PieceInvariant, vtkTypeBool);
96  vtkBooleanMacro(PieceInvariant, vtkTypeBool);
98 
100  {
101  VTK_DIRECTION_SPECIFIED_VECTOR = 0,
102  VTK_DIRECTION_SPECIFIED_ORIGIN = 1,
103  VTK_DIRECTION_CAMERA_ORIGIN = 2,
104  VTK_DIRECTION_CAMERA_VECTOR = 3
105  };
106 
108 
112  vtkSetMacro(Direction, int);
113  vtkGetMacro(Direction, int);
114  void SetDirectionToSpecifiedVector() { this->SetDirection(VTK_DIRECTION_SPECIFIED_VECTOR); }
115  void SetDirectionToSpecifiedOrigin() { this->SetDirection(VTK_DIRECTION_SPECIFIED_ORIGIN); }
116  void SetDirectionToCameraVector() { this->SetDirection(VTK_DIRECTION_CAMERA_VECTOR); }
117  void SetDirectionToCameraOrigin() { this->SetDirection(VTK_DIRECTION_CAMERA_ORIGIN); }
119 
121 
126  virtual void SetCamera(vtkCamera VTK_WRAP_EXTERN*);
127  vtkGetObjectMacro(Camera, vtkCamera VTK_WRAP_EXTERN);
129 
131 
138  void SetProp3D(vtkProp3D VTK_WRAP_EXTERN*);
139  vtkProp3D VTK_WRAP_EXTERN* GetProp3D();
141 
143 
148  vtkSetVector3Macro(Vector, double);
149  vtkGetVectorMacro(Vector, double, 3);
151 
153 
158  vtkSetVector3Macro(Origin, double);
159  vtkGetVectorMacro(Origin, double, 3);
161 
166  vtkMTimeType GetMTime() override;
167 
168 protected:
170  ~vtkPolyDataSilhouette() override;
171 
173  void ComputeProjectionVector(double vector[3], double origin[3]);
174 
179  double Vector[3];
180  double Origin[3];
181 
183  double FeatureAngle;
184 
187 
188  vtkPolyDataEdges* PreComp; // precomputed data for a given point of view
189 
190 private:
192  void operator=(const vtkPolyDataSilhouette&) = delete;
193 };
194 
195 #endif
void SetDirectionToCameraVector()
Specify how view direction is computed.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
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:60
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:49
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:69
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:39
void SetDirectionToSpecifiedOrigin()
Specify how view direction is computed.
a virtual camera for 3D rendering
Definition: vtkCamera.h:51
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.