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) VTK_OVERRIDE;
40 
45  void TransformPoints(vtkPoints *inPts, vtkPoints *outPts) VTK_OVERRIDE;
46 
52  vtkPoints *outPts,
53  vtkDataArray *inNms,
54  vtkDataArray *outNms,
55  vtkDataArray *inVrs,
56  vtkDataArray *outVrs) VTK_OVERRIDE;
57 
64 
72  vtkMatrix4x4 *GetMatrix() { this->Update(); return this->Matrix; };
73 
78  {
79  return static_cast<vtkHomogeneousTransform *>(this->GetInverse());
80  }
81 
83 
87  void InternalTransformPoint(const float in[3], float out[3]) VTK_OVERRIDE;
88  void InternalTransformPoint(const double in[3], double out[3]) VTK_OVERRIDE;
90 
92 
97  void InternalTransformDerivative(const float in[3], float out[3],
98  float derivative[3][3]) VTK_OVERRIDE;
99  void InternalTransformDerivative(const double in[3], double out[3],
100  double derivative[3][3]) VTK_OVERRIDE;
102 
103 protected:
105  ~vtkHomogeneousTransform() VTK_OVERRIDE;
106 
107  void InternalDeepCopy(vtkAbstractTransform *transform) VTK_OVERRIDE;
108 
109  vtkMatrix4x4 *Matrix;
110 
111 private:
112  vtkHomogeneousTransform(const vtkHomogeneousTransform&) VTK_DELETE_FUNCTION;
113  void operator=(const vtkHomogeneousTransform&) VTK_DELETE_FUNCTION;
114 };
115 
116 #endif
117 
118 
119 
120 
121 
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:40
vtkHomogeneousTransform
superclass for homogeneous transformations
Definition: vtkHomogeneousTransform.h:35
vtkAbstractTransform
superclass for all geometric transformations
Definition: vtkAbstractTransform.h:51
vtkHomogeneousTransform::GetHomogeneousInverse
vtkHomogeneousTransform * GetHomogeneousInverse()
Just like GetInverse(), but includes typecast to vtkHomogeneousTransform.
Definition: vtkHomogeneousTransform.h:77
vtkHomogeneousTransform::GetMatrix
vtkMatrix4x4 * GetMatrix()
Get a pointer to an internal vtkMatrix4x4 that represents the transformation.
Definition: vtkHomogeneousTransform.h:72
vtkAbstractTransform.h
vtkHomogeneousTransform::InternalTransformPoint
void InternalTransformPoint(const double in[3], double out[3]) override
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkAbstractTransform::Update
void Update()
Update the transform to account for any changes which have been made.
vtkAbstractTransform::GetInverse
vtkAbstractTransform * GetInverse()
Get the inverse of this transform.
vtkHomogeneousTransform::~vtkHomogeneousTransform
~vtkHomogeneousTransform() override
vtkHomogeneousTransform::vtkHomogeneousTransform
vtkHomogeneousTransform()
vtkHomogeneousTransform::TransformPoints
void TransformPoints(vtkPoints *inPts, vtkPoints *outPts) override
Apply the transformation to a series of points, and append the results to outPts.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkHomogeneousTransform::InternalTransformPoint
void InternalTransformPoint(const float in[3], float out[3]) override
This will calculate the transformation without calling Update.
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:42
vtkHomogeneousTransform::InternalTransformDerivative
void InternalTransformDerivative(const double in[3], double out[3], double derivative[3][3]) override
vtkHomogeneousTransform::InternalTransformDerivative
void InternalTransformDerivative(const float in[3], float out[3], float derivative[3][3]) override
This will calculate the transformation as well as its derivative without calling Update.
vtkHomogeneousTransform::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkHomogeneousTransform::TransformPointsNormalsVectors
void TransformPointsNormalsVectors(vtkPoints *inPts, vtkPoints *outPts, vtkDataArray *inNms, vtkDataArray *outNms, vtkDataArray *inVrs, vtkDataArray *outVrs) override
Apply the transformation to a combination of points, normals and vectors.
vtkHomogeneousTransform::GetMatrix
void GetMatrix(vtkMatrix4x4 *m)
Get a copy of the internal transformation matrix.