Commit 1d5ffab8 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE] - removed in-place normalize() calls in modules and common

parent 2c1363c6
......@@ -46,8 +46,8 @@ WPlane::WPlane( const WVector3d_2& normal, const WPosition_2& pos, const WVector
m_pos( pos )
{
setPlaneVectors( first, second );
m_first.normalize();
m_second.normalize();
m_first = normalize( m_first );
m_second = normalize( m_second );
}
WPlane::~WPlane()
......
......@@ -142,9 +142,9 @@ public:
gen = WVector3d_2( 0, 1, 0 );
}
m_first = cross( normal, gen );
m_first.normalize();
m_first = normalize( m_first );
m_second = cross( normal, m_first );
m_second.normalize();
m_second = normalize( m_second );
}
// \cond
......
......@@ -40,7 +40,7 @@ WUnitSphereCoordinates::WUnitSphereCoordinates( double theta, double phi )
WUnitSphereCoordinates::WUnitSphereCoordinates( WVector3d_2 vector )
{
vector.normalize();
vector = normalize( vector );
// calculate angles
m_theta = std::acos( vector[2] );
m_phi = std::atan2( vector[1], vector[0] );
......
......@@ -228,9 +228,9 @@ void WTalairachConverter::defineRotationMatrix()
m_ihp_proj = ihp_proj;
WVector3d_2 ex( m_ac - m_pc );
ex.normalize();
ex = normalize( ex );
WVector3d_2 ez( ihp_proj - m_ac );
ez.normalize();
ez = normalize( ez );
WVector3d_2 ey = cross( ez, ex );
m_rotMat( 0, 0 ) = ex[0];
......
......@@ -332,7 +332,7 @@ WVector3d_2 WMDeterministicFTMori::getEigenDirection( boost::shared_ptr< WDataSe
v[ 0 ] = vs->rawData()[ 4 * i + 0 ];
v[ 1 ] = vs->rawData()[ 4 * i + 1 ];
v[ 2 ] = vs->rawData()[ 4 * i + 2 ];
v.normalize();
v = normalize( v );
if( length( j.second ) == 0 )
{
return v;
......
......@@ -430,7 +430,7 @@ osg::ref_ptr< osg::Node > WMFiberDisplaySimple::createFiberGeode( boost::shared_
osg::Vec3 tangent = osg::Vec3( fibTangents->at( ( 3 * k ) + sidx ),
fibTangents->at( ( 3 * k ) + sidx + 1 ),
fibTangents->at( ( 3 * k ) + sidx + 2 ) );
tangent.normalize();
tangent = normalize( tangent );
vertices->push_back( vert );
colors->push_back( color );
......
......@@ -181,9 +181,9 @@ void WSurface::execute()
jacobiEigenvector3D( myTensor, &eigenSys );
eigenSys[0].second.normalize();
eigenSys[1].second.normalize();
eigenSys[2].second.normalize();
eigenSys[0].second = normalize( eigenSys[0].second );
eigenSys[1].second = normalize( eigenSys[1].second );
eigenSys[2].second = normalize( eigenSys[2].second );
// This sorts the entries automatically :-)
std::map< double, WVector3d_2 > sortedEigenSystem;
......
......@@ -743,7 +743,7 @@ void WMTeemGlyphs::GlyphGeneration::operator()( size_t id, size_t numThreads, WB
( *m_normals )[globalVertexId][0] = glyph->norm[3*vertId];
( *m_normals )[globalVertexId][1] = glyph->norm[3*vertId+1];
( *m_normals )[globalVertexId][2] = glyph->norm[3*vertId+2];
( *m_normals )[globalVertexId].normalize();
( *m_normals )[globalVertexId] = normalize( ( *m_normals )[globalVertexId] );
// ------------------------------------------------
// colors
......
......@@ -161,7 +161,7 @@ std::vector< double > WBresenham::computeDistances( const size_t voxelNum,
const WPosition_2& end ) const
{
WPosition_2 u = end - start;
u.normalize();
u = normalize( u );
std::vector< WPosition_2 > x;
x.reserve( 7 );
......
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