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 =========================================================================*/
50 #ifndef vtkPolyDataSilhouette_h
51 #define vtkPolyDataSilhouette_h
52 
53 #include "vtkFiltersHybridModule.h" // For export macro
54 #include "vtkPolyDataAlgorithm.h"
55 
56 class vtkCamera;
57 class vtkProp3D;
58 class vtkTransform;
59 class vtkPolyDataEdges;
60 
61 class VTKFILTERSHYBRID_EXPORT vtkPolyDataSilhouette : public vtkPolyDataAlgorithm
62 {
63 public:
68 
70  void PrintSelf(ostream& os, vtkIndent indent) override;
71 
73 
76  vtkSetMacro(EnableFeatureAngle, int);
77  vtkGetMacro(EnableFeatureAngle, int);
79 
81 
84  vtkSetMacro(FeatureAngle, double);
85  vtkGetMacro(FeatureAngle, double);
87 
89 
93  vtkSetMacro(BorderEdges, vtkTypeBool);
94  vtkGetMacro(BorderEdges, vtkTypeBool);
95  vtkBooleanMacro(BorderEdges, vtkTypeBool);
97 
99 
103  vtkSetMacro(PieceInvariant, vtkTypeBool);
104  vtkGetMacro(PieceInvariant, vtkTypeBool);
105  vtkBooleanMacro(PieceInvariant, vtkTypeBool);
107 
109  {
110  VTK_DIRECTION_SPECIFIED_VECTOR = 0,
111  VTK_DIRECTION_SPECIFIED_ORIGIN = 1,
112  VTK_DIRECTION_CAMERA_ORIGIN = 2,
113  VTK_DIRECTION_CAMERA_VECTOR = 3
114  };
115 
117 
121  vtkSetMacro(Direction, int);
122  vtkGetMacro(Direction, int);
123  void SetDirectionToSpecifiedVector() { this->SetDirection(VTK_DIRECTION_SPECIFIED_VECTOR); }
124  void SetDirectionToSpecifiedOrigin() { this->SetDirection(VTK_DIRECTION_SPECIFIED_ORIGIN); }
125  void SetDirectionToCameraVector() { this->SetDirection(VTK_DIRECTION_CAMERA_VECTOR); }
126  void SetDirectionToCameraOrigin() { this->SetDirection(VTK_DIRECTION_CAMERA_ORIGIN); }
128 
130 
135  virtual void SetCamera(vtkCamera VTK_WRAP_EXTERN*);
136  vtkGetObjectMacro(Camera, vtkCamera VTK_WRAP_EXTERN);
138 
140 
147  void SetProp3D(vtkProp3D VTK_WRAP_EXTERN*);
148  vtkProp3D VTK_WRAP_EXTERN* GetProp3D();
150 
152 
157  vtkSetVector3Macro(Vector, double);
158  vtkGetVectorMacro(Vector, double, 3);
160 
162 
167  vtkSetVector3Macro(Origin, double);
168  vtkGetVectorMacro(Origin, double, 3);
170 
175  vtkMTimeType GetMTime() override;
176 
177 protected:
180 
182  void ComputeProjectionVector(double vector[3], double origin[3]);
183 
188  double Vector[3];
189  double Origin[3];
190 
192  double FeatureAngle;
193 
196 
197  vtkPolyDataEdges* PreComp; // precomputed data for a given point of view
198 
199 private:
201  void operator=(const vtkPolyDataSilhouette&) = delete;
202 };
203 
204 #endif
a virtual camera for 3D rendering
Definition: vtkCamera.h:61
a simple class to control print indentation
Definition: vtkIndent.h:49
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:59
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:70
@ vector
Definition: vtkX3D.h:243
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287