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:
27  void PrintSelf(ostream& os, vtkIndent indent) override;
28 
33  void TransformPoints(vtkPoints* inPts, vtkPoints* outPts) override;
34 
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 
58  {
59  this->Update();
60  return this->Matrix;
61  }
62 
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 
87  const float in[3], float out[3], float derivative[3][3]) override;
89  const double in[3], double out[3], double derivative[3][3]) override;
91 
92 protected:
94  ~vtkHomogeneousTransform() override;
95 
96  void InternalDeepCopy(vtkAbstractTransform* transform) override;
97 
99 
100 private:
102  void operator=(const vtkHomogeneousTransform&) = delete;
103 };
104 
105 VTK_ABI_NAMESPACE_END
106 #endif
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:30
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:28
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:44
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:28