Commit 2d8b54d0 by Sebastian Eichelbaum

[ADD] scale all axes with one coeff.

parent a77c8faf
......@@ -28,6 +28,7 @@
#include "../common/exceptions/WPreconditionNotMet.h"
#include "../common/math/WMatrix.h"
#include "../common/math/linearAlgebra/WPosition.h"
#include "../common/math/linearAlgebra/WMatrixFixed.h"
/**
* Implements an orthogonal grid transformation.
......@@ -231,6 +232,13 @@ public:
void scale( VecType const& scale );
/**
* Scale the transform.
*
* \param scale scaling coeffitient for the 3 directions.
*/
void scale( T const& scale );
/**
* Compares two grid transforms.
*
* \param other the one to compare against
......@@ -520,6 +528,14 @@ void WGridTransformOrthoTemplate< T >::scale( VecType const& scale )
}
template< typename T >
void WGridTransformOrthoTemplate< T >::scale( T const& scale )
{
m_scaling[ 0 ] *= scale;
m_scaling[ 1 ] *= scale;
m_scaling[ 2 ] *= scale;
}
template< typename T >
template< typename InputType >
void WGridTransformOrthoTemplate< T >::copyFrom( WGridTransformOrthoTemplate< InputType > const& input )
{
......
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