Commit 2d8b54d0 authored by Sebastian Eichelbaum's avatar 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.
......@@ -230,6 +231,13 @@ public:
template< typename VecType >
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.
*
......@@ -519,6 +527,14 @@ void WGridTransformOrthoTemplate< T >::scale( VecType const& scale )
m_scaling[ 2 ] *= scale[ 2 ];
}
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