VTK: Common/Transforms/vtkHomogeneousTransform.h Source File

| VTK 9.3.1

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
17 #include "vtkAbstractTransform.h"
18 #include "vtkCommonTransformsModule.h" // For export macro
19
20 VTK_ABI_NAMESPACE_BEGIN
21 class vtkMatrix4x4;
22
23 class VTKCOMMONTRANSFORMS_EXPORT vtkHomogeneousTransform : public vtkAbstractTransform
24 {
25 public:
26 vtkTypeMacro(vtkHomogeneousTransform, vtkAbstractTransform);
27 void PrintSelf(ostream& os, vtkIndent indent) override;
28
33 void TransformPoints(vtkPoints* inPts, vtkPoints* outPts) override;
34
39 void TransformPointsNormalsVectors(vtkPoints* inPts, vtkPoints* outPts, vtkDataArray* inNms,
40 vtkDataArray* outNms, vtkDataArray* inVrs, vtkDataArray* outVrs, int nOptionalVectors = 0,
41 vtkDataArray** inVrsArr = nullptr, vtkDataArray** outVrsArr = nullptr) override;
42
48 void GetMatrix(vtkMatrix4x4* m);
49
57 vtkMatrix4x4* GetMatrix()
58 {
59 this->Update();
60 return this->Matrix;
61 }
62
66 vtkHomogeneousTransform* GetHomogeneousInverse()
67 {
68 return static_cast<vtkHomogeneousTransform*>(this->GetInverse());
69 }
70
72
76 void InternalTransformPoint(const float in[3], float out[3]) override;
77 void InternalTransformPoint(const double in[3], double out[3]) override;
79
81
86 void InternalTransformDerivative(
87 const float in[3], float out[3], float derivative[3][3]) override;
88 void InternalTransformDerivative(
89 const double in[3], double out[3], double derivative[3][3]) override;
91
92 protected:
93 vtkHomogeneousTransform();
94 ~vtkHomogeneousTransform() override;
95
96 void InternalDeepCopy(vtkAbstractTransform* transform) override;
97
98 vtkMatrix4x4* Matrix;
99
100 private:
101 vtkHomogeneousTransform(const vtkHomogeneousTransform&) = delete;
102 void operator=(const vtkHomogeneousTransform&) = delete;
103 };
104
105 VTK_ABI_NAMESPACE_END
106 #endif
vtkAbstractTransform
superclass for all geometric transformations
Definition: vtkAbstractTransform.h:39
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.
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkHomogeneousTransform
superclass for homogeneous transformations
Definition: vtkHomogeneousTransform.h:24
vtkHomogeneousTransform::GetMatrix
void GetMatrix(vtkMatrix4x4 *m)
Get a copy of the internal transformation matrix.
vtkHomogeneousTransform::GetHomogeneousInverse
vtkHomogeneousTransform * GetHomogeneousInverse()
Just like GetInverse(), but includes typecast to vtkHomogeneousTransform.
Definition: vtkHomogeneousTransform.h:66
vtkHomogeneousTransform::TransformPointsNormalsVectors
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.
vtkHomogeneousTransform::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkHomogeneousTransform::InternalTransformPoint
void InternalTransformPoint(const double in[3], double out[3]) override
This will calculate the transformation without calling Update.
vtkHomogeneousTransform::GetMatrix
vtkMatrix4x4 * GetMatrix()
Get a pointer to an internal vtkMatrix4x4 that represents the transformation.
Definition: vtkHomogeneousTransform.h:57
vtkHomogeneousTransform::Matrix
vtkMatrix4x4 * Matrix
Definition: vtkHomogeneousTransform.h:98
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::InternalTransformPoint
void InternalTransformPoint(const float in[3], float out[3]) override
This will calculate the transformation without calling Update.
vtkHomogeneousTransform::InternalDeepCopy
void InternalDeepCopy(vtkAbstractTransform *transform) override
Perform any subclass-specific DeepCopy.
vtkHomogeneousTransform::vtkHomogeneousTransform
vtkHomogeneousTransform()
vtkHomogeneousTransform::~vtkHomogeneousTransform
~vtkHomogeneousTransform() override
vtkHomogeneousTransform::TransformPoints
void TransformPoints(vtkPoints *inPts, vtkPoints *outPts) override
Apply the transformation to a series of points, and append the results to outPts.
vtkHomogeneousTransform::InternalTransformDerivative
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.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:40
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:38
vtkAbstractTransform.h