VTK
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 =========================================================================*/
38 #ifndef vtkPolyDataSilhouette_h
39 #define vtkPolyDataSilhouette_h
40 
41 #include "vtkFiltersHybridModule.h" // For export macro
42 #include "vtkPolyDataAlgorithm.h"
43 
44 
45 class vtkCamera;
46 class vtkProp3D;
47 class vtkTransform;
48 class vtkPolyDataEdges;
49 
50 class VTKFILTERSHYBRID_EXPORT vtkPolyDataSilhouette : public vtkPolyDataAlgorithm
51 {
52 public:
56  static vtkPolyDataSilhouette *New();
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);
113  {this->SetDirection( VTK_DIRECTION_SPECIFIED_VECTOR ); }
115  {this->SetDirection( VTK_DIRECTION_SPECIFIED_ORIGIN ); }
117  {this->SetDirection( VTK_DIRECTION_CAMERA_VECTOR ); }
119  {this->SetDirection( VTK_DIRECTION_CAMERA_ORIGIN ); }
121 
123 
128  virtual void SetCamera(vtkCamera VTK_WRAP_EXTERN*);
129  vtkGetObjectMacro(Camera,vtkCamera VTK_WRAP_EXTERN);
131 
133 
140  void SetProp3D(vtkProp3D VTK_WRAP_EXTERN*);
141  vtkProp3D VTK_WRAP_EXTERN*GetProp3D();
143 
145 
150  vtkSetVector3Macro(Vector,double);
151  vtkGetVectorMacro(Vector,double,3);
153 
155 
160  vtkSetVector3Macro(Origin,double);
161  vtkGetVectorMacro(Origin,double,3);
163 
168  vtkMTimeType GetMTime() override;
169 
170 protected:
172  ~vtkPolyDataSilhouette() override;
173 
175  void ComputeProjectionVector(double vector[3], double origin[3]);
176 
181  double Vector[3];
182  double Origin[3];
183 
185  double FeatureAngle;
186 
189 
190  vtkPolyDataEdges* PreComp; // precomputed data for a given point of view
191 
192 private:
194  void operator=(const vtkPolyDataSilhouette&) = delete;
195 };
196 
197 #endif
void SetDirectionToCameraVector()
Specify how view direction is computed.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
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:54
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:43
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:33
void SetDirectionToSpecifiedOrigin()
Specify how view direction is computed.
a virtual camera for 3D rendering
Definition: vtkCamera.h:44
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.