Commit f16d8af6 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[STYLE]

parent 29781d13
......@@ -29,10 +29,6 @@
#include <string>
#include <vector>
#include <boost/lexical_cast.hpp>
#include <string>
#include <list>
#include <utility>
......@@ -44,7 +40,7 @@
#include <boost/lexical_cast.hpp>
#include "math/WPosition.h"
#include "math/linearAlgebra/WMatrix.h"
#include "math/linearAlgebra/WMatrixFixed.h"
#include "WItemSelector.h"
#include "WColor.h"
#include "WAssert.h"
......
......@@ -27,7 +27,7 @@
#include "../WExportCommon.h"
#include "WMatrix.h"
#include "linearAlgebra/WMatrix.h"
#include "linearAlgebra/WLinearAlgebra.h"
namespace osg
{
......
......@@ -31,7 +31,7 @@
#include "WValue.h"
#include "WVector3D.h"
#include "linearAlgebra/WMatrix.h"
#include "linearAlgebra/WLinearAlgebra.h"
#include "../WDefines.h"
......
......@@ -30,7 +30,7 @@
#include "../WExportCommon.h"
#include "WMath.h"
#include "WMatrix.h"
#include "linearAlgebra/WMatrix.h"
#include "linearAlgebra/WLinearAlgebra.h"
#include "WUnitSphereCoordinates.h"
#include "WVector3D.h"
......
......@@ -4,7 +4,7 @@ FILE( GLOB LINALG_SRC "*.cpp" "*.h" )
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${LINALG_SRC}"
"OWcommon"
"WMatrix" # only header
"WLinearAlgebra" # only header
"WPosition" # is a WMatrixFixed. Gets tested there
"WVectorFixed" # is a WMatrixFixed. Gets tested there
)
......
......@@ -22,5 +22,5 @@
//
//---------------------------------------------------------------------------
#include "WMatrix.h"
#include "WLinearAlgebra.h"
......@@ -22,11 +22,11 @@
//
//---------------------------------------------------------------------------
#ifndef WMATRIXALL_H
#define WMATRIXALL_H
#ifndef WLINEARALGEBRA_H
#define WLINEARALGEBRA_H
#include "WMatrixFixed.h"
#include "WMatrixEigen.h"
#include "WVectorFixed.h"
#endif // WMATRIXALL_H
#endif // WLINEARALGEBRA_H
......@@ -33,8 +33,8 @@
#include <boost/tokenizer.hpp>
// Needed for conversion: OSG Types
#include <osg/Vec3d>
#include <osg/Vec3f>
#include <osg/Vec2d>
#include <osg/Vec2f>
#include <osg/Vec3d>
#include <osg/Vec3f>
#include <osg/Vec4d>
......@@ -483,7 +483,7 @@ public:
*
* \param m the Eigen3 matrix.
*/
WMatrixFixed( const Eigen::Matrix< ValueT, Rows, Cols >& m )
WMatrixFixed( const Eigen::Matrix< ValueT, Rows, Cols >& m ) // NOLINT - we do not want it explicit
{
for ( size_t row = 0; row < Rows; ++row )
{
......@@ -499,7 +499,7 @@ public:
*
* \param m the OSG matrix.
*/
WMatrixFixed( const osg::Matrixd& m )
explicit WMatrixFixed( const osg::Matrixd& m ) // NOLINT - we do not want it explicit
{
BOOST_STATIC_ASSERT( Rows == 4 );
BOOST_STATIC_ASSERT( Cols == 4 );
......@@ -892,7 +892,7 @@ typename WTypeTraits::TypePromotion< AValueT, BValueT >::Result dot( const WMatr
template< typename AValueT, ValueStoreTemplate AValueStoreT,
typename BValueT, ValueStoreTemplate BValueStoreT,
ValueStoreTemplate ResultValueStoreT >
WMatrixFixed< typename WTypeTraits::TypePromotion< AValueT, BValueT >::Result, 3, 1, ResultValueStoreT >
WMatrixFixed< typename WTypeTraits::TypePromotion< AValueT, BValueT >::Result, 3, 1, ResultValueStoreT >
cross( const WMatrixFixed< AValueT, 3, 1, AValueStoreT >& a, const WMatrixFixed< BValueT, 3, 1, BValueStoreT >& b )
{
typedef WMatrixFixed< typename WTypeTraits::TypePromotion< AValueT, BValueT >::Result, 3, 1, ResultValueStoreT > ResultT;
......
......@@ -123,9 +123,9 @@ WMatrix4d_2 makeRotate( ValueT angle, ValueT x, ValueT y, ValueT z )
WVector3dRow_2 uT( transpose( u ) );
WMatrix3d_2 uuT = u * uT;
WMatrix3d_2 s;
s( 0, 0 ) = 0.0; s( 0, 1 ) = -u[2]; s( 0, 2 ) = u[1];
s( 1, 0 ) = u[2]; s( 1, 1 ) = 0.0; s( 1, 2 ) = -u[0];
s( 2, 0 ) = -u[1]; s( 2, 1 ) = u[0]; s( 2, 2 ) = 0.0;
s( 0, 0 ) = 0.0; s( 0, 1 ) = -u[2]; s( 0, 2 ) = u[1]; // NOLINT - multiple commands on one line
s( 1, 0 ) = u[2]; s( 1, 1 ) = 0.0; s( 1, 2 ) = -u[0]; // NOLINT - multiple commands on one line
s( 2, 0 ) = -u[1]; s( 2, 1 ) = u[0]; s( 2, 2 ) = 0.0; // NOLINT - multiple commands on one line
// Now we can formulate the rotation matrix:
return WMatrix4d_2::fromMatrices(
......
......@@ -32,7 +32,7 @@
#include "../../WException.h"
#include "../WLinearAlgebraFunctions.h"
#include "../WMatrix.h"
#include "../linearAlgebra/WMatrix.h"
#include "../linearAlgebra/WLinearAlgebra.h"
#include "../WVector3D.h"
#include "WVector3DTraits.h"
......
......@@ -39,7 +39,7 @@
#include <cxxtest/TestSuite.h>
#include "../WMatrix.h"
#include "../linearAlgebra/WMatrix.h"
#include "../linearAlgebra/WLinearAlgebra.h"
#include "../WValue.h"
#include "../WVector3D.h"
......
......@@ -22,7 +22,7 @@
//
//---------------------------------------------------------------------------
#include "../common/math/linearAlgebra/WMatrix.h"
#include "../common/math/linearAlgebra/WLinearAlgebra.h"
#include "WValueSet.h"
......
......@@ -31,7 +31,7 @@
#include "../common/math/WLinearAlgebraFunctions.h"
#include "../common/WBoundingBox.h"
#include "../common/WProperties.h"
#include "../common/math/linearAlgebra/WMatrix.h"
#include "../common/math/linearAlgebra/WLinearAlgebra.h"
#include "WGridRegular3D.h"
......
......@@ -27,7 +27,7 @@
#include "../common/math/WVector3D.h"
#include "../common/math/WMatrix.h"
#include "../common/math/linearAlgebra/WMatrix.h"
#include "../common/math/linearAlgebra/WLinearAlgebra.h"
#include "WExportDataHandler.h"
......
......@@ -28,6 +28,7 @@
#include <map>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <boost/signals2/signal.hpp>
......@@ -38,7 +39,7 @@
#include "../common/WBoundingBox.h"
#include "../common/WSharedSequenceContainer.h"
#include "../common/WSharedAssociativeContainer.h"
#include "../common/math/linearAlgebra/WMatrix.h"
#include "../common/math/linearAlgebra/WLinearAlgebra.h"
#include "callbacks/WGEFunctorCallback.h"
......
......@@ -42,7 +42,7 @@
#include "../common/WBoundingBox.h"
#include "../common/WProperties.h"
#include "../common/WPropertyHelper.h"
#include "../common/math/linearAlgebra/WMatrix.h"
#include "../common/math/linearAlgebra/WLinearAlgebra.h"
#include "WGETextureUtils.h"
......
......@@ -197,14 +197,14 @@ osg::ref_ptr< osg::Image > genTF()
tf[ 4 * x + 0 ] = 255;
tf[ 4 * x + 1 ] = 86;
tf[ 4 * x + 2 ] = 86;
tf[ 4 * x + 3 ] = 127;//26;
tf[ 4 * x + 3 ] = 127;
}
else
{
tf[ 4 * x + 0 ] = 255;
tf[ 4 * x + 1 ] = 191;
tf[ 4 * x + 2 ] = 0;
tf[ 4 * x + 3 ] = 64;//26;
tf[ 4 * x + 3 ] = 64;
}
}
if ( x <= 127 )
......
......@@ -139,25 +139,24 @@ vec4 transferFunction( float value )
return vec4( 0.0 );
}
// Example TF
/*if ( isZero( value - 0.5, 0.005 ) )
return vec4( 0.0 );
vec4 c = vec4( 0.0 );
if ( value >= 0.5 )
{
c = vec4( 1.0, 0.34, 0.34, 2.0 * ( value - 0.5 ) );
}
else
{
vec4 cols[2];
cols[1] = vec4( 0.0, 0.37, 1.0, 0.1 );
cols[0] = vec4( 0.0, 1.0, 1.0, 0.1 );
int i = int(2.0 * value * 2.0 * 15.0);
int imod = i % 2;
c = cols[ imod ];
}
return c;
*/
// if ( isZero( value - 0.5, 0.005 ) )
// return vec4( 0.0 );
// vec4 c = vec4( 0.0 );
// if ( value >= 0.5 )
// {
// c = vec4( 1.0, 0.34, 0.34, 2.0 * ( value - 0.5 ) );
// }
// else
// {
// vec4 cols[2];
// cols[1] = vec4( 0.0, 0.37, 1.0, 0.1 );
// cols[0] = vec4( 0.0, 1.0, 1.0, 0.1 );
//
// int i = int(2.0 * value * 2.0 * 15.0);
// int imod = i % 2;
// c = cols[ imod ];
// }
// return c;
#endif
}
......
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