VTK  9.0.3
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 class vtkCamera;
45 class vtkProp3D;
46 class vtkTransform;
47 class vtkPolyDataEdges;
48 
49 class VTKFILTERSHYBRID_EXPORT vtkPolyDataSilhouette : public vtkPolyDataAlgorithm
50 {
51 public:
56 
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
61 
64  vtkSetMacro(EnableFeatureAngle, int);
65  vtkGetMacro(EnableFeatureAngle, int);
67 
69 
72  vtkSetMacro(FeatureAngle, double);
73  vtkGetMacro(FeatureAngle, double);
75 
77 
81  vtkSetMacro(BorderEdges, vtkTypeBool);
82  vtkGetMacro(BorderEdges, vtkTypeBool);
83  vtkBooleanMacro(BorderEdges, vtkTypeBool);
85 
87 
91  vtkSetMacro(PieceInvariant, vtkTypeBool);
92  vtkGetMacro(PieceInvariant, vtkTypeBool);
93  vtkBooleanMacro(PieceInvariant, vtkTypeBool);
95 
97  {
98  VTK_DIRECTION_SPECIFIED_VECTOR = 0,
99  VTK_DIRECTION_SPECIFIED_ORIGIN = 1,
100  VTK_DIRECTION_CAMERA_ORIGIN = 2,
101  VTK_DIRECTION_CAMERA_VECTOR = 3
102  };
103 
105 
109  vtkSetMacro(Direction, int);
110  vtkGetMacro(Direction, int);
111  void SetDirectionToSpecifiedVector() { this->SetDirection(VTK_DIRECTION_SPECIFIED_VECTOR); }
112  void SetDirectionToSpecifiedOrigin() { this->SetDirection(VTK_DIRECTION_SPECIFIED_ORIGIN); }
113  void SetDirectionToCameraVector() { this->SetDirection(VTK_DIRECTION_CAMERA_VECTOR); }
114  void SetDirectionToCameraOrigin() { this->SetDirection(VTK_DIRECTION_CAMERA_ORIGIN); }
116 
118 
123  virtual void SetCamera(vtkCamera VTK_WRAP_EXTERN*);
124  vtkGetObjectMacro(Camera, vtkCamera VTK_WRAP_EXTERN);
126 
128 
135  void SetProp3D(vtkProp3D VTK_WRAP_EXTERN*);
136  vtkProp3D VTK_WRAP_EXTERN* GetProp3D();
138 
140 
145  vtkSetVector3Macro(Vector, double);
146  vtkGetVectorMacro(Vector, double, 3);
148 
150 
155  vtkSetVector3Macro(Origin, double);
156  vtkGetVectorMacro(Origin, double, 3);
158 
163  vtkMTimeType GetMTime() override;
164 
165 protected:
168 
170  void ComputeProjectionVector(double vector[3], double origin[3]);
171 
176  double Vector[3];
177  double Origin[3];
178 
180  double FeatureAngle;
181 
184 
185  vtkPolyDataEdges* PreComp; // precomputed data for a given point of view
186 
187 private:
189  void operator=(const vtkPolyDataSilhouette&) = delete;
190 };
191 
192 #endif
a virtual camera for 3D rendering
Definition: vtkCamera.h:46
a simple class to control print indentation
Definition: vtkIndent.h:34
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
~vtkPolyDataSilhouette() override
vtkProp3D VTK_WRAP_EXTERN * GetProp3D()
static vtkPolyDataSilhouette * New()
Instantiate object.
vtkPolyDataEdges * PreComp
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])
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:44
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:55
@ vector
Definition: vtkX3D.h:243
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293