Commit e40d4564 authored by Robert Maynard's avatar Robert Maynard
Browse files

vtkAbstractTransform derived classes now use VTK_OVERRIDE.

parent d32e45cd
Pipeline #23220 passed with stage
......@@ -239,7 +239,7 @@ public:
// Description:
// Needs a special UnRegister() implementation to avoid
// circular references.
virtual void UnRegister(vtkObjectBase *O);
void UnRegister(vtkObjectBase *O) VTK_OVERRIDE;
protected:
vtkAbstractTransform();
......
......@@ -40,7 +40,7 @@ public:
// Description:
// Make another transform of the same type.
vtkAbstractTransform *MakeTransform();
vtkAbstractTransform *MakeTransform() VTK_OVERRIDE;
protected:
vtkCylindricalTransform();
......@@ -48,25 +48,25 @@ protected:
// Description:
// Copy this transform from another of the same type.
void InternalDeepCopy(vtkAbstractTransform *transform);
void InternalDeepCopy(vtkAbstractTransform *transform) VTK_OVERRIDE;
// Description:
// Internal functions for calculating the transformation.
void ForwardTransformPoint(const float in[3], float out[3]);
void ForwardTransformPoint(const double in[3], double out[3]);
void ForwardTransformPoint(const float in[3], float out[3]) VTK_OVERRIDE;
void ForwardTransformPoint(const double in[3], double out[3]) VTK_OVERRIDE;
void ForwardTransformDerivative(const float in[3], float out[3],
float derivative[3][3]);
float derivative[3][3]) VTK_OVERRIDE;
void ForwardTransformDerivative(const double in[3], double out[3],
double derivative[3][3]);
double derivative[3][3]) VTK_OVERRIDE;
void InverseTransformPoint(const float in[3], float out[3]);
void InverseTransformPoint(const double in[3], double out[3]);
void InverseTransformPoint(const float in[3], float out[3]) VTK_OVERRIDE;
void InverseTransformPoint(const double in[3], double out[3]) VTK_OVERRIDE;
void InverseTransformDerivative(const float in[3], float out[3],
float derivative[3][3]);
float derivative[3][3]) VTK_OVERRIDE;
void InverseTransformDerivative(const double in[3], double out[3],
double derivative[3][3]);
double derivative[3][3]) VTK_OVERRIDE;
private:
vtkCylindricalTransform(const vtkCylindricalTransform&) VTK_DELETE_FUNCTION;
......
......@@ -43,13 +43,15 @@ public:
// Set this transformation to the identity transformation. If
// the transform has an Input, then the transformation will be
// reset so that it is the same as the Input.
void Identity() { this->Concatenation->Identity(); this->Modified(); };
void Identity()
{ this->Concatenation->Identity(); this->Modified(); };
// Description:
// Invert the transformation. This will also set a flag so that
// the transformation will use the inverse of its Input, if an Input
// has been set.
void Inverse() { this->Concatenation->Inverse(); this->Modified(); };
void Inverse() VTK_OVERRIDE
{ this->Concatenation->Inverse(); this->Modified(); }
// Description:
// Create a translation matrix and concatenate it with the current
......@@ -185,17 +187,17 @@ public:
// Description:
// This will calculate the transformation without calling Update.
// Meant for use only within other VTK classes.
void InternalTransformPoint(const float in[3], float out[3]);
void InternalTransformPoint(const double in[3], double out[3]);
void InternalTransformPoint(const float in[3], float out[3]) VTK_OVERRIDE;
void InternalTransformPoint(const double in[3], double out[3]) VTK_OVERRIDE;
// Description:
// This will calculate the transformation as well as its derivative
// without calling Update. Meant for use only within other VTK
// classes.
void InternalTransformDerivative(const float in[3], float out[3],
float derivative[3][3]);
float derivative[3][3]) VTK_OVERRIDE;
void InternalTransformDerivative(const double in[3], double out[3],
double derivative[3][3]);
double derivative[3][3]) VTK_OVERRIDE;
// Description:
// Check for self-reference. Will return true if concatenating
......@@ -204,11 +206,11 @@ public:
// CircuitCheck is automatically called by SetInput(), SetInverse(),
// and Concatenate(vtkXTransform *). Avoid using this function,
// it is experimental.
int CircuitCheck(vtkAbstractTransform *transform);
int CircuitCheck(vtkAbstractTransform *transform) VTK_OVERRIDE;
// Description:
// Make another transform of the same type.
vtkAbstractTransform *MakeTransform();
vtkAbstractTransform *MakeTransform() VTK_OVERRIDE;
// Description:
// Override GetMTime to account for input and concatenation.
......@@ -218,8 +220,8 @@ protected:
vtkGeneralTransform();
~vtkGeneralTransform();
void InternalDeepCopy(vtkAbstractTransform *t);
void InternalUpdate();
void InternalDeepCopy(vtkAbstractTransform *t) VTK_OVERRIDE;
void InternalUpdate() VTK_OVERRIDE;
vtkAbstractTransform *Input;
vtkTransformConcatenation *Concatenation;
......
......@@ -39,17 +39,17 @@ public:
// Description:
// Apply the transformation to a series of points, and append the
// results to outPts.
void TransformPoints(vtkPoints *inPts, vtkPoints *outPts);
void TransformPoints(vtkPoints *inPts, vtkPoints *outPts) VTK_OVERRIDE;
// Description:
// Apply the transformation to a combination of points, normals
// and vectors.
virtual void TransformPointsNormalsVectors(vtkPoints *inPts,
vtkPoints *outPts,
vtkDataArray *inNms,
vtkDataArray *outNms,
vtkDataArray *inVrs,
vtkDataArray *outVrs);
void TransformPointsNormalsVectors(vtkPoints *inPts,
vtkPoints *outPts,
vtkDataArray *inNms,
vtkDataArray *outNms,
vtkDataArray *inVrs,
vtkDataArray *outVrs) VTK_OVERRIDE;
// Description:
// Get a copy of the internal transformation matrix. The
......@@ -75,23 +75,23 @@ public:
// Description:
// This will calculate the transformation without calling Update.
// Meant for use only within other VTK classes.
void InternalTransformPoint(const float in[3], float out[3]);
void InternalTransformPoint(const double in[3], double out[3]);
void InternalTransformPoint(const float in[3], float out[3]) VTK_OVERRIDE;
void InternalTransformPoint(const double in[3], double out[3]) VTK_OVERRIDE;
// Description:
// This will calculate the transformation as well as its derivative
// without calling Update. Meant for use only within other VTK
// classes.
void InternalTransformDerivative(const float in[3], float out[3],
float derivative[3][3]);
float derivative[3][3]) VTK_OVERRIDE;
void InternalTransformDerivative(const double in[3], double out[3],
double derivative[3][3]);
double derivative[3][3]) VTK_OVERRIDE;
protected:
vtkHomogeneousTransform();
~vtkHomogeneousTransform();
void InternalDeepCopy(vtkAbstractTransform *transform);
void InternalDeepCopy(vtkAbstractTransform *transform) VTK_OVERRIDE;
vtkMatrix4x4 *Matrix;
......
......@@ -38,17 +38,17 @@ public:
// Description:
// Apply the transformation to a series of points, and append the
// results to outPts.
void TransformPoints(vtkPoints *inPts, vtkPoints *outPts);
void TransformPoints(vtkPoints *inPts, vtkPoints *outPts) VTK_OVERRIDE;
// Description:
// Apply the transformation to a series of normals, and append the
// results to outNms.
void TransformNormals(vtkDataArray *inNms, vtkDataArray *outNms);
void TransformNormals(vtkDataArray *inNms, vtkDataArray *outNms) VTK_OVERRIDE;
// Description:
// Apply the transformation to a series of vectors, and append the
// results to outVrs.
void TransformVectors(vtkDataArray *inVrs, vtkDataArray *outVrs);
void TransformVectors(vtkDataArray *inVrs, vtkDataArray *outVrs) VTK_OVERRIDE;
// Description:
// Apply the transformation to a combination of points, normals
......@@ -58,49 +58,49 @@ public:
vtkDataArray *inNms,
vtkDataArray *outNms,
vtkDataArray *inVrs,
vtkDataArray *outVrs);
vtkDataArray *outVrs) VTK_OVERRIDE;
// Invert the transformation. This doesn't do anything to the
// identity transformation.
void Inverse() {}
void Inverse() VTK_OVERRIDE {}
// Description:
// This will calculate the transformation without calling Update.
// Meant for use only within other VTK classes.
void InternalTransformPoint(const float in[3], float out[3]);
void InternalTransformPoint(const double in[3], double out[3]);
void InternalTransformPoint(const float in[3], float out[3]) VTK_OVERRIDE;
void InternalTransformPoint(const double in[3], double out[3]) VTK_OVERRIDE;
// Description:
// This will calculate the transformation without calling Update.
// Meant for use only within other VTK classes.
void InternalTransformNormal(const float in[3], float out[3]);
void InternalTransformNormal(const double in[3], double out[3]);
void InternalTransformNormal(const float in[3], float out[3]) VTK_OVERRIDE;
void InternalTransformNormal(const double in[3], double out[3]) VTK_OVERRIDE;
// Description:
// This will calculate the transformation without calling Update.
// Meant for use only within other VTK classes.
void InternalTransformVector(const float in[3], float out[3]);
void InternalTransformVector(const double in[3], double out[3]);
void InternalTransformVector(const float in[3], float out[3]) VTK_OVERRIDE;
void InternalTransformVector(const double in[3], double out[3]) VTK_OVERRIDE;
// Description:
// This will calculate the transformation as well as its derivative
// without calling Update. Meant for use only within other VTK
// classes.
void InternalTransformDerivative(const float in[3], float out[3],
float derivative[3][3]);
float derivative[3][3]) VTK_OVERRIDE;
void InternalTransformDerivative(const double in[3], double out[3],
double derivative[3][3]);
double derivative[3][3]) VTK_OVERRIDE;
// Description:
// Make a transform of the same type. This will actually
// return the same transform.
vtkAbstractTransform *MakeTransform();
vtkAbstractTransform *MakeTransform() VTK_OVERRIDE;
protected:
vtkIdentityTransform();
~vtkIdentityTransform();
void InternalDeepCopy(vtkAbstractTransform *t);
void InternalDeepCopy(vtkAbstractTransform *t) VTK_OVERRIDE;
private:
vtkIdentityTransform(const vtkIdentityTransform&) VTK_DELETE_FUNCTION;
......
......@@ -74,7 +74,7 @@ public:
// Description:
// Invert the transformation. This is done by switching the
// source and target landmarks.
void Inverse();
void Inverse() VTK_OVERRIDE;
// Description:
// Get the MTime.
......@@ -82,18 +82,18 @@ public:
// Description:
// Make another transform of the same type.
vtkAbstractTransform *MakeTransform();
vtkAbstractTransform *MakeTransform() VTK_OVERRIDE;
protected:
vtkLandmarkTransform();
~vtkLandmarkTransform();
// Update the matrix from the quaternion.
void InternalUpdate();
void InternalUpdate() VTK_OVERRIDE;
// Description:
// This method does no type checking, use DeepCopy instead.
void InternalDeepCopy(vtkAbstractTransform *transform);
void InternalDeepCopy(vtkAbstractTransform *transform) VTK_OVERRIDE;
vtkPoints* SourceLandmarks;
vtkPoints* TargetLandmarks;
......
......@@ -124,7 +124,7 @@ public:
// Description:
// Apply the transformation to a series of points, and append the
// results to outPts.
void TransformPoints(vtkPoints *inPts, vtkPoints *outPts);
void TransformPoints(vtkPoints *inPts, vtkPoints *outPts) VTK_OVERRIDE;
// Description:
// Apply the transformation to a series of normals, and append the
......@@ -144,7 +144,7 @@ public:
vtkDataArray *inNms,
vtkDataArray *outNms,
vtkDataArray *inVrs,
vtkDataArray *outVrs);
vtkDataArray *outVrs) VTK_OVERRIDE;
// Description:
// Just like GetInverse, but it includes a typecast to
......@@ -157,8 +157,8 @@ public:
// Description:
// This will calculate the transformation without calling Update.
// Meant for use only within other VTK classes.
void InternalTransformPoint(const float in[3], float out[3]);
void InternalTransformPoint(const double in[3], double out[3]);
void InternalTransformPoint(const float in[3], float out[3]) VTK_OVERRIDE;
void InternalTransformPoint(const double in[3], double out[3]) VTK_OVERRIDE;
// Description:
// This will calculate the transformation without calling Update.
......@@ -177,9 +177,9 @@ public:
// without calling Update. Meant for use only within other VTK
// classes.
void InternalTransformDerivative(const float in[3], float out[3],
float derivative[3][3]);
float derivative[3][3]) VTK_OVERRIDE;
void InternalTransformDerivative(const double in[3], double out[3],
double derivative[3][3]);
double derivative[3][3]) VTK_OVERRIDE;
protected:
vtkLinearTransform() {}
......
......@@ -36,7 +36,7 @@ class VTKCOMMONTRANSFORMS_EXPORT vtkMatrixToHomogeneousTransform : public vtkHom
public:
static vtkMatrixToHomogeneousTransform *New();
vtkTypeMacro(vtkMatrixToHomogeneousTransform,vtkHomogeneousTransform);
void PrintSelf (ostream& os, vtkIndent indent);
void PrintSelf (ostream& os, vtkIndent indent) VTK_OVERRIDE;
// Set the input matrix. Any modifications to the matrix will be
// reflected in the transformation.
......@@ -46,7 +46,7 @@ class VTKCOMMONTRANSFORMS_EXPORT vtkMatrixToHomogeneousTransform : public vtkHom
// Description:
// The input matrix is left as-is, but the transformation matrix
// is inverted.
void Inverse();
void Inverse() VTK_OVERRIDE;
// Description:
// Get the MTime: this is the bit of magic that makes everything work.
......@@ -54,14 +54,14 @@ class VTKCOMMONTRANSFORMS_EXPORT vtkMatrixToHomogeneousTransform : public vtkHom
// Description:
// Make a new transform of the same type.
vtkAbstractTransform *MakeTransform();
vtkAbstractTransform *MakeTransform() VTK_OVERRIDE;
protected:
vtkMatrixToHomogeneousTransform();
~vtkMatrixToHomogeneousTransform();
void InternalUpdate();
void InternalDeepCopy(vtkAbstractTransform *transform);
void InternalUpdate() VTK_OVERRIDE;
void InternalDeepCopy(vtkAbstractTransform *transform) VTK_OVERRIDE;
int InverseFlag;
vtkMatrix4x4 *Input;
......
......@@ -36,7 +36,7 @@ class VTKCOMMONTRANSFORMS_EXPORT vtkMatrixToLinearTransform : public vtkLinearTr
public:
static vtkMatrixToLinearTransform *New();
vtkTypeMacro(vtkMatrixToLinearTransform,vtkLinearTransform);
void PrintSelf (ostream& os, vtkIndent indent);
void PrintSelf (ostream& os, vtkIndent indent) VTK_OVERRIDE;
// Description:
// Set the input matrix. Any modifications to the matrix will be
......@@ -47,7 +47,7 @@ class VTKCOMMONTRANSFORMS_EXPORT vtkMatrixToLinearTransform : public vtkLinearTr
// Description:
// The input matrix is left as-is, but the transformation matrix
// is inverted.
void Inverse();
void Inverse() VTK_OVERRIDE;
// Description:
// Get the MTime: this is the bit of magic that makes everything work.
......@@ -55,14 +55,14 @@ class VTKCOMMONTRANSFORMS_EXPORT vtkMatrixToLinearTransform : public vtkLinearTr
// Description:
// Make a new transform of the same type.
vtkAbstractTransform *MakeTransform();
vtkAbstractTransform *MakeTransform() VTK_OVERRIDE;
protected:
vtkMatrixToLinearTransform();
~vtkMatrixToLinearTransform();
void InternalUpdate();
void InternalDeepCopy(vtkAbstractTransform *transform);
void InternalUpdate() VTK_OVERRIDE;
void InternalDeepCopy(vtkAbstractTransform *transform) VTK_OVERRIDE;
int InverseFlag;
vtkMatrix4x4 *Input;
......
......@@ -64,7 +64,8 @@ class VTKCOMMONTRANSFORMS_EXPORT vtkPerspectiveTransform : public vtkHomogeneous
// Invert the transformation. This will also set a flag so that
// the transformation will use the inverse of its Input, if an Input
// has been set.
void Inverse() { this->Concatenation->Inverse(); this->Modified(); };
void Inverse() VTK_OVERRIDE
{ this->Concatenation->Inverse(); this->Modified(); };
// Description:
// Perform an adjustment to the viewport coordinates. By default Ortho,
......@@ -301,7 +302,7 @@ class VTKCOMMONTRANSFORMS_EXPORT vtkPerspectiveTransform : public vtkHomogeneous
// Description:
// Make a new transform of the same type -- you are responsible for
// deleting the transform when you are done with it.
vtkAbstractTransform *MakeTransform();
vtkAbstractTransform *MakeTransform() VTK_OVERRIDE;
// Description:
// Check for self-reference. Will return true if concatenating
......@@ -310,7 +311,7 @@ class VTKCOMMONTRANSFORMS_EXPORT vtkPerspectiveTransform : public vtkHomogeneous
// CircuitCheck is automatically called by SetInput(), SetInverse(),
// and Concatenate(vtkXTransform *). Avoid using this function,
// it is experimental.
int CircuitCheck(vtkAbstractTransform *transform);
int CircuitCheck(vtkAbstractTransform *transform) VTK_OVERRIDE;
// Description:
// Override GetMTime to account for input and concatenation.
......@@ -320,8 +321,8 @@ protected:
vtkPerspectiveTransform();
~vtkPerspectiveTransform();
void InternalDeepCopy(vtkAbstractTransform *t);
void InternalUpdate();
void InternalDeepCopy(vtkAbstractTransform *t) VTK_OVERRIDE;
void InternalUpdate() VTK_OVERRIDE;
vtkHomogeneousTransform *Input;
vtkTransformConcatenation *Concatenation;
......
......@@ -41,7 +41,7 @@ public:
// Description:
// Make another transform of the same type.
vtkAbstractTransform *MakeTransform();
vtkAbstractTransform *MakeTransform() VTK_OVERRIDE;
protected:
vtkSphericalTransform();
......@@ -49,25 +49,25 @@ protected:
// Description:
// Copy this transform from another of the same type.
void InternalDeepCopy(vtkAbstractTransform *transform);
void InternalDeepCopy(vtkAbstractTransform *transform) VTK_OVERRIDE;
// Description:
// Internal functions for calculating the transformation.
void ForwardTransformPoint(const float in[3], float out[3]);
void ForwardTransformPoint(const double in[3], double out[3]);
void ForwardTransformPoint(const float in[3], float out[3]) VTK_OVERRIDE;
void ForwardTransformPoint(const double in[3], double out[3]) VTK_OVERRIDE;
void ForwardTransformDerivative(const float in[3], float out[3],
float derivative[3][3]);
float derivative[3][3]) VTK_OVERRIDE;
void ForwardTransformDerivative(const double in[3], double out[3],
double derivative[3][3]);
double derivative[3][3]) VTK_OVERRIDE;
void InverseTransformPoint(const float in[3], float out[3]);
void InverseTransformPoint(const double in[3], double out[3]);
void InverseTransformPoint(const float in[3], float out[3]) VTK_OVERRIDE;
void InverseTransformPoint(const double in[3], double out[3]) VTK_OVERRIDE;
void InverseTransformDerivative(const float in[3], float out[3],
float derivative[3][3]);
float derivative[3][3]) VTK_OVERRIDE;
void InverseTransformDerivative(const double in[3], double out[3],
double derivative[3][3]);
double derivative[3][3]) VTK_OVERRIDE;
private:
vtkSphericalTransform(const vtkSphericalTransform&) VTK_DELETE_FUNCTION;
......
......@@ -100,7 +100,7 @@ public:
// Description:
// Make another transform of the same type.
vtkAbstractTransform *MakeTransform();
vtkAbstractTransform *MakeTransform() VTK_OVERRIDE;
protected:
vtkThinPlateSplineTransform();
......@@ -108,19 +108,19 @@ protected:
// Description:
// Prepare the transformation for application.
void InternalUpdate();
void InternalUpdate() VTK_OVERRIDE;
// Description:
// This method does no type checking, use DeepCopy instead.
void InternalDeepCopy(vtkAbstractTransform *transform);
void InternalDeepCopy(vtkAbstractTransform *transform) VTK_OVERRIDE;
void ForwardTransformPoint(const float in[3], float out[3]);
void ForwardTransformPoint(const double in[3], double out[3]);
void ForwardTransformPoint(const float in[3], float out[3]) VTK_OVERRIDE;
void ForwardTransformPoint(const double in[3], double out[3]) VTK_OVERRIDE;
void ForwardTransformDerivative(const float in[3], float out[3],
float derivative[3][3]);
float derivative[3][3]) VTK_OVERRIDE;
void ForwardTransformDerivative(const double in[3], double out[3],
double derivative[3][3]);
double derivative[3][3]) VTK_OVERRIDE;
double Sigma;
vtkPoints *SourceLandmarks;
......
......@@ -65,7 +65,7 @@ class VTKCOMMONTRANSFORMS_EXPORT vtkTransform : public vtkLinearTransform
// Invert the transformation. This will also set a flag so that
// the transformation will use the inverse of its Input, if an Input
// has been set.
void Inverse();
void Inverse() VTK_OVERRIDE;
// Description:
// Create a translation matrix and concatenate it with the current
......@@ -295,7 +295,7 @@ class VTKCOMMONTRANSFORMS_EXPORT vtkTransform : public vtkLinearTransform
// CircuitCheck is automatically called by SetInput(), SetInverse(),
// and Concatenate(vtkXTransform *). Avoid using this function,
// it is experimental.
int CircuitCheck(vtkAbstractTransform *transform);
int CircuitCheck(vtkAbstractTransform *transform) VTK_OVERRIDE;
// Return an inverse transform which will always update itself
// to match this transform.
......@@ -304,7 +304,7 @@ class VTKCOMMONTRANSFORMS_EXPORT vtkTransform : public vtkLinearTransform
// Description:
// Make a new transform of the same type.
vtkAbstractTransform *MakeTransform();
vtkAbstractTransform *MakeTransform() VTK_OVERRIDE;
// Description:
// Override GetMTime to account for input and concatenation.
......@@ -323,9 +323,9 @@ protected:
vtkTransform ();
~vtkTransform ();
void InternalDeepCopy(vtkAbstractTransform *t);
void InternalDeepCopy(vtkAbstractTransform *t) VTK_OVERRIDE;
void InternalUpdate();
void InternalUpdate() VTK_OVERRIDE;
vtkLinearTransform *Input;
vtkTransformConcatenation *Concatenation;
......
......@@ -38,7 +38,7 @@ public:
// inverted using an iterative technique such as Newton's method.
// The inverse transform is usually around five or six times as
// computationally expensive as the forward transform.
void Inverse();
void Inverse() VTK_OVERRIDE;
// Description:
// Get the inverse flag of the transformation. This flag is
......@@ -64,17 +64,17 @@ public:
// Description:
// This will calculate the transformation without calling Update.
// Meant for use only within other VTK classes.
void InternalTransformPoint(const float in[3], float out[3]);
void InternalTransformPoint(const double in[3], double out[3]);
void InternalTransformPoint(const float in[3], float out[3]) VTK_OVERRIDE;
void InternalTransformPoint(const double in[3], double out[3]) VTK_OVERRIDE;
// Description:
// This will calculate the transformation, as well as its derivative
// without calling Update. Meant for use only within other VTK
// classes.
void InternalTransformDerivative(const float in[3], float out[3],
float derivative[3][3]);
float derivative[3][3]) VTK_OVERRIDE;
void InternalTransformDerivative(const double in[3], double out[3],
double derivative[3][3]);
double derivative[3][3]) VTK_OVERRIDE;
// Description:
// Do not use these methods. They exists only as a work-around for
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment