VTK
vtkHomogeneousTransform.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHomogeneousTransform.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 =========================================================================*/
26 #ifndef vtkHomogeneousTransform_h
27 #define vtkHomogeneousTransform_h
28 
29 #include "vtkCommonTransformsModule.h" // For export macro
30 #include "vtkAbstractTransform.h"
31 
32 class vtkMatrix4x4;
33 
34 class VTKCOMMONTRANSFORMS_EXPORT vtkHomogeneousTransform : public vtkAbstractTransform
35 {
36 public:
37 
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
45  void TransformPoints(vtkPoints *inPts, vtkPoints *outPts) override;
46 
52  vtkPoints *outPts,
53  vtkDataArray *inNms,
54  vtkDataArray *outNms,
55  vtkDataArray *inVrs,
56  vtkDataArray *outVrs,
57  int nOptionalVectors = 0,
58  vtkDataArray** inVrsArr = nullptr,
59  vtkDataArray** outVrsArr = nullptr) override;
60 
66  void GetMatrix(vtkMatrix4x4 *m);
67 
75  vtkMatrix4x4 *GetMatrix() { this->Update(); return this->Matrix; };
76 
81  {
82  return static_cast<vtkHomogeneousTransform *>(this->GetInverse());
83  }
84 
86 
90  void InternalTransformPoint(const float in[3], float out[3]) override;
91  void InternalTransformPoint(const double in[3], double out[3]) override;
93 
95 
100  void InternalTransformDerivative(const float in[3], float out[3],
101  float derivative[3][3]) override;
102  void InternalTransformDerivative(const double in[3], double out[3],
103  double derivative[3][3]) override;
105 
106 protected:
108  ~vtkHomogeneousTransform() override;
109 
110  void InternalDeepCopy(vtkAbstractTransform *transform) override;
111 
113 
114 private:
116  void operator=(const vtkHomogeneousTransform&) = delete;
117 };
118 
119 #endif
120 
121 
122 
123 
124 
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:41
virtual void TransformPointsNormalsVectors(vtkPoints *inPts, vtkPoints *outPts, vtkDataArray *inNms, vtkDataArray *outNms, vtkDataArray *inVrs, vtkDataArray *outVrs, int nOptionalVectors=0, vtkDataArray **inVrsArr=nullptr, vtkDataArray **outVrsArr=nullptr)
Apply the transformation to a combination of points, normals and vectors.
superclass for homogeneous transformations
virtual void TransformPoints(vtkPoints *inPts, vtkPoints *outPts)
Apply the transformation to a series of points, and append the results to outPts. ...
vtkAbstractTransform * GetInverse()
Get the inverse of this transform.
vtkHomogeneousTransform * GetHomogeneousInverse()
Just like GetInverse(), but includes typecast to vtkHomogeneousTransform.
virtual void InternalDeepCopy(vtkAbstractTransform *)
Perform any subclass-specific DeepCopy.
void Update()
Update the transform to account for any changes which have been made.
a simple class to control print indentation
Definition: vtkIndent.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
superclass for all geometric transformations
virtual void InternalTransformPoint(const float in[3], float out[3])=0
This will calculate the transformation without calling Update.
virtual void InternalTransformDerivative(const float in[3], float out[3], float derivative[3][3])=0
This will transform a point and, at the same time, calculate a 3x3 Jacobian matrix that provides the ...
vtkMatrix4x4 * GetMatrix()
Get a pointer to an internal vtkMatrix4x4 that represents the transformation.
represent and manipulate 3D points
Definition: vtkPoints.h:39