VTK  9.3.20240907
vtkHomogeneousTransform.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
14#ifndef vtkHomogeneousTransform_h
15#define vtkHomogeneousTransform_h
16
18#include "vtkCommonTransformsModule.h" // For export macro
19#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
20
21VTK_ABI_NAMESPACE_BEGIN
22class vtkMatrix4x4;
23
24class VTKCOMMONTRANSFORMS_EXPORT VTK_MARSHALAUTO vtkHomogeneousTransform
26{
27public:
29 void PrintSelf(ostream& os, vtkIndent indent) override;
30
35 void TransformPoints(vtkPoints* inPts, vtkPoints* outPts) override;
36
42 vtkDataArray* outNms, vtkDataArray* inVrs, vtkDataArray* outVrs, int nOptionalVectors = 0,
43 vtkDataArray** inVrsArr = nullptr, vtkDataArray** outVrsArr = nullptr) override;
44
51
60 {
61 this->Update();
62 return this->Matrix;
63 }
64
69 {
70 return static_cast<vtkHomogeneousTransform*>(this->GetInverse());
71 }
72
74
78 void InternalTransformPoint(const float in[3], float out[3]) override;
79 void InternalTransformPoint(const double in[3], double out[3]) override;
81
83
89 const float in[3], float out[3], float derivative[3][3]) override;
91 const double in[3], double out[3], double derivative[3][3]) override;
93
94protected:
97
98 void InternalDeepCopy(vtkAbstractTransform* transform) override;
99
101
102private:
104 void operator=(const vtkHomogeneousTransform&) = delete;
105};
106
107VTK_ABI_NAMESPACE_END
108#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
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:108
represent and manipulate 4x4 transformation matrices
represent and manipulate 3D points
Definition vtkPoints.h:139
#define VTK_MARSHALAUTO