VTK  9.1.0
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
30#include "vtkCommonTransformsModule.h" // For export macro
31
32class vtkMatrix4x4;
33
34class VTKCOMMONTRANSFORMS_EXPORT vtkHomogeneousTransform : public vtkAbstractTransform
35{
36public:
38 void PrintSelf(ostream& os, vtkIndent indent) override;
39
44 void TransformPoints(vtkPoints* inPts, vtkPoints* outPts) override;
45
51 vtkDataArray* outNms, vtkDataArray* inVrs, vtkDataArray* outVrs, int nOptionalVectors = 0,
52 vtkDataArray** inVrsArr = nullptr, vtkDataArray** outVrsArr = nullptr) override;
53
60
69 {
70 this->Update();
71 return this->Matrix;
72 }
73
78 {
79 return static_cast<vtkHomogeneousTransform*>(this->GetInverse());
80 }
81
83
87 void InternalTransformPoint(const float in[3], float out[3]) override;
88 void InternalTransformPoint(const double in[3], double out[3]) override;
90
92
98 const float in[3], float out[3], float derivative[3][3]) override;
100 const double in[3], double out[3], double derivative[3][3]) override;
102
103protected:
106
107 void InternalDeepCopy(vtkAbstractTransform* transform) override;
108
110
111private:
113 void operator=(const vtkHomogeneousTransform&) = delete;
114};
115
116#endif
superclass for all geometric transformations
void Update()
Update the transform to account for any changes which have been made.
vtkAbstractTransform * GetInverse()
Get the inverse of this transform.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
superclass for homogeneous transformations
void GetMatrix(vtkMatrix4x4 *m)
Get a copy of the internal transformation matrix.
vtkHomogeneousTransform * GetHomogeneousInverse()
Just like GetInverse(), but includes typecast to vtkHomogeneousTransform.
void TransformPointsNormalsVectors(vtkPoints *inPts, vtkPoints *outPts, vtkDataArray *inNms, vtkDataArray *outNms, vtkDataArray *inVrs, vtkDataArray *outVrs, int nOptionalVectors=0, vtkDataArray **inVrsArr=nullptr, vtkDataArray **outVrsArr=nullptr) override
Apply the transformation to a combination of points, normals and vectors.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void InternalTransformPoint(const double in[3], double out[3]) override
This will calculate the transformation without calling Update.
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.
void InternalTransformPoint(const float in[3], float out[3]) override
This will calculate the transformation without calling Update.
void InternalDeepCopy(vtkAbstractTransform *transform) override
Perform any subclass-specific DeepCopy.
~vtkHomogeneousTransform() override
void TransformPoints(vtkPoints *inPts, vtkPoints *outPts) override
Apply the transformation to a series of points, and append the results to outPts.
void InternalTransformDerivative(const double in[3], double out[3], double derivative[3][3]) override
This will calculate the transformation as well as its derivative without calling Update.
vtkMatrix4x4 * GetMatrix()
Get a pointer to an internal vtkMatrix4x4 that represents the transformation.
a simple class to control print indentation
Definition: vtkIndent.h:113
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:145
represent and manipulate 3D points
Definition: vtkPoints.h:143