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 =========================================================================*/
70 #ifndef vtkPolyDataSilhouette_h
71 #define vtkPolyDataSilhouette_h
72 
73 #include "vtkFiltersHybridModule.h" // For export macro
74 #include "vtkPolyDataAlgorithm.h"
75 
76 class vtkCamera;
77 class vtkProp3D;
78 class vtkTransform;
79 class vtkPolyDataEdges;
80 
81 class VTKFILTERSHYBRID_EXPORT vtkPolyDataSilhouette : public vtkPolyDataAlgorithm
82 {
83 public:
88 
90  void PrintSelf(ostream& os, vtkIndent indent) override;
91 
93 
96  vtkSetMacro(EnableFeatureAngle, int);
97  vtkGetMacro(EnableFeatureAngle, int);
99 
101 
104  vtkSetMacro(FeatureAngle, double);
105  vtkGetMacro(FeatureAngle, double);
107 
109 
113  vtkSetMacro(BorderEdges, vtkTypeBool);
114  vtkGetMacro(BorderEdges, vtkTypeBool);
115  vtkBooleanMacro(BorderEdges, vtkTypeBool);
117 
119 
123  vtkSetMacro(PieceInvariant, vtkTypeBool);
124  vtkGetMacro(PieceInvariant, vtkTypeBool);
125  vtkBooleanMacro(PieceInvariant, vtkTypeBool);
127 
129  {
130  VTK_DIRECTION_SPECIFIED_VECTOR = 0,
131  VTK_DIRECTION_SPECIFIED_ORIGIN = 1,
132  VTK_DIRECTION_CAMERA_ORIGIN = 2,
133  VTK_DIRECTION_CAMERA_VECTOR = 3
134  };
135 
137 
141  vtkSetMacro(Direction, int);
142  vtkGetMacro(Direction, int);
143  void SetDirectionToSpecifiedVector() { this->SetDirection(VTK_DIRECTION_SPECIFIED_VECTOR); }
144  void SetDirectionToSpecifiedOrigin() { this->SetDirection(VTK_DIRECTION_SPECIFIED_ORIGIN); }
145  void SetDirectionToCameraVector() { this->SetDirection(VTK_DIRECTION_CAMERA_VECTOR); }
146  void SetDirectionToCameraOrigin() { this->SetDirection(VTK_DIRECTION_CAMERA_ORIGIN); }
148 
150 
155  virtual void SetCamera(vtkCamera VTK_WRAP_EXTERN*);
156  vtkGetObjectMacro(Camera, vtkCamera VTK_WRAP_EXTERN);
158 
160 
167  void SetProp3D(vtkProp3D VTK_WRAP_EXTERN*);
168  vtkProp3D VTK_WRAP_EXTERN* GetProp3D();
170 
172 
177  vtkSetVector3Macro(Vector, double);
178  vtkGetVectorMacro(Vector, double, 3);
180 
182 
187  vtkSetVector3Macro(Origin, double);
188  vtkGetVectorMacro(Origin, double, 3);
190 
195  vtkMTimeType GetMTime() override;
196 
197 protected:
200 
202  void ComputeProjectionVector(double vector[3], double origin[3]);
203 
208  double Vector[3];
209  double Origin[3];
210 
212  double FeatureAngle;
213 
216 
217  vtkPolyDataEdges* PreComp; // precomputed data for a given point of view
218 
219 private:
221  void operator=(const vtkPolyDataSilhouette&) = delete;
222 };
223 
224 #endif
a virtual camera for 3D rendering
Definition: vtkCamera.h:161
a simple class to control print indentation
Definition: vtkIndent.h:119
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:99
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:170
@ vector
Definition: vtkX3D.h:243
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287