Commit e795818b authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum

[CHANGE] - renamed WMatrixXX_2 to WMAtrixXX and WVectorXX_2 to WVectorXX.

parent df11a218
......@@ -105,9 +105,9 @@ namespace WPVBaseTypes
typedef std::string PV_STRING; //!< base type used for every WPVString
typedef boost::filesystem::path PV_PATH; //!< base type used for every WPVFilename
typedef WItemSelector PV_SELECTION; //!< base type used for every WPVSelection
typedef WPosition_2 PV_POSITION; //!< base type used for every WPVPosition
typedef WPosition PV_POSITION; //!< base type used for every WPVPosition
typedef WColor PV_COLOR; //!< base type used for every WPVColor
typedef WMatrix4d_2 PV_MATRIX4X4; //!< base type used for every WPVMatrix4X4
typedef WMatrix4d PV_MATRIX4X4; //!< base type used for every WPVMatrix4X4
/**
* Enum denoting the possible trigger states. It is used for trigger properties.
......@@ -550,7 +550,7 @@ namespace PROPERTY_TYPE_HELPER
*/
WPVBaseTypes::PV_MATRIX4X4 create( const WPVBaseTypes::PV_MATRIX4X4& /*old*/, const std::string str )
{
WMatrix4d_2 c;
WMatrix4d c;
std::vector< std::string > tokens;
tokens = string_utils::tokenize( str, ";" );
WAssert( tokens.size() >= 16, "There weren't 16 values for a 4x4 Matrix" );
......
......@@ -85,7 +85,7 @@ namespace
}
}
WFiber::WFiber( const std::vector< WPosition_2 > &points )
WFiber::WFiber( const std::vector< WPosition > &points )
: WLine( points )
{
}
......
......@@ -41,11 +41,11 @@ class OWCOMMON_EXPORT WFiber : public WLine
friend class WFiberTest;
public:
/**
* Constructs a new fiber out of WPosition_2s.
* Constructs a new fiber out of WPositions.
*
* \param points Reference to the points which belong to this fiber
*/
explicit WFiber( const std::vector< WPosition_2 > &points );
explicit WFiber( const std::vector< WPosition > &points );
/**
* Creates an empty fiber.
......
......@@ -41,16 +41,16 @@ class WFiberTest : public CxxTest::TestSuite
{
public:
/**
* Two fibers are equal if they have equal WPosition_2s in same order
* Two fibers are equal if they have equal WPositions in same order
*/
void testEqualityOperator( void )
{
WFiber fib1;
WFiber fib2;
fib1.push_back( WPosition_2( 1.2, 3.4, 5.6 ) );
fib1.push_back( WPosition_2( 7.8, 9.0, -1.2 ) );
fib2.push_back( WPosition_2( 1.2, 3.4, 5.6 ) );
fib2.push_back( WPosition_2( 7.8, 9.0, -1.2 ) );
fib1.push_back( WPosition( 1.2, 3.4, 5.6 ) );
fib1.push_back( WPosition( 7.8, 9.0, -1.2 ) );
fib2.push_back( WPosition( 1.2, 3.4, 5.6 ) );
fib2.push_back( WPosition( 7.8, 9.0, -1.2 ) );
TS_ASSERT_EQUALS( fib1, fib2 );
}
......@@ -61,11 +61,11 @@ public:
void testDLTisSymmetric( void )
{
WFiber q;
q.push_back( WPosition_2( 0, 1, 0 ) );
q.push_back( WPosition_2( 0, 0, 0 ) );
q.push_back( WPosition( 0, 1, 0 ) );
q.push_back( WPosition( 0, 0, 0 ) );
WFiber r;
r.push_back( WPosition_2( 1, 1, 0 ) );
r.push_back( WPosition_2( 2, 2, 0 ) );
r.push_back( WPosition( 1, 1, 0 ) );
r.push_back( WPosition( 2, 2, 0 ) );
TS_ASSERT_EQUALS( WFiber::distDLT( 1.0, q, r ), std::sqrt( 5.0 ) / 2.0 );
TS_ASSERT_EQUALS( WFiber::distDLT( 1.0, r, q ), std::sqrt( 5.0 ) / 2.0 );
......@@ -78,11 +78,11 @@ public:
void testDSTisSymmetric( void )
{
WFiber q;
q.push_back( WPosition_2( 0, 1, 0 ) );
q.push_back( WPosition_2( 0, 0, 0 ) );
q.push_back( WPosition( 0, 1, 0 ) );
q.push_back( WPosition( 0, 0, 0 ) );
WFiber r;
r.push_back( WPosition_2( 1, 1, 0 ) );
r.push_back( WPosition_2( 2, 2, 0 ) );
r.push_back( WPosition( 1, 1, 0 ) );
r.push_back( WPosition( 2, 2, 0 ) );
TS_ASSERT_EQUALS( WFiber::distDST( 1.0, q, r ), std::sqrt( 2.0 ) / 2.0 );
TS_ASSERT_EQUALS( WFiber::distDST( 1.0, r, q ), std::sqrt( 2.0 ) / 2.0 );
......@@ -95,11 +95,11 @@ public:
void testDTMeasure( void )
{
WFiber q;
q.push_back( WPosition_2( 0, 1, 0 ) );
q.push_back( WPosition_2( 0, 0, 0 ) );
q.push_back( WPosition( 0, 1, 0 ) );
q.push_back( WPosition( 0, 0, 0 ) );
WFiber r;
r.push_back( WPosition_2( 1, 1, 0 ) );
r.push_back( WPosition_2( 2, 2, 0 ) );
r.push_back( WPosition( 1, 1, 0 ) );
r.push_back( WPosition( 2, 2, 0 ) );
TS_ASSERT_EQUALS( WFiber::distDST( 1.0, q, r ), std::sqrt( 2.0 ) / 2.0 );
TS_ASSERT_EQUALS( WFiber::distDLT( 1.0, q, r ), std::sqrt( 5.0 ) / 2.0 );
......
......@@ -27,7 +27,7 @@
#include "WGeometryFunctions.h"
void tesselateIcosahedron( std::vector< WVector3d_2 >* vertices, std::vector< unsigned int >* triangles, unsigned int level )
void tesselateIcosahedron( std::vector< WVector3d >* vertices, std::vector< unsigned int >* triangles, unsigned int level )
{
WAssert( vertices, "Missing input vector." );
WAssert( triangles, "Missing input vector." );
......@@ -47,24 +47,24 @@ void tesselateIcosahedron( std::vector< WVector3d_2 >* vertices, std::vector< un
// add icosahedron vertices
double phi = 0.5 * ( 1.0 + sqrt( 5.0 ) );
std::vector< WVector3d_2 > g;
std::vector< WVector3d > g;
vertices->push_back( WVector3d_2( phi, 1, 0 ) ); // 0
vertices->push_back( WVector3d_2( -phi, 1, 0 ) ); // 1
vertices->push_back( WVector3d_2( phi, -1, 0 ) ); // 2
vertices->push_back( WVector3d_2( -phi, -1, 0 ) ); // 3
vertices->push_back( WVector3d( phi, 1, 0 ) ); // 0
vertices->push_back( WVector3d( -phi, 1, 0 ) ); // 1
vertices->push_back( WVector3d( phi, -1, 0 ) ); // 2
vertices->push_back( WVector3d( -phi, -1, 0 ) ); // 3
vertices->push_back( WVector3d_2( 1, 0, phi ) ); // 4
vertices->push_back( WVector3d_2( -1, 0, phi ) ); // 5
vertices->push_back( WVector3d_2( 1, 0, -phi ) ); // 6
vertices->push_back( WVector3d_2( -1, 0, -phi ) ); // 7
vertices->push_back( WVector3d( 1, 0, phi ) ); // 4
vertices->push_back( WVector3d( -1, 0, phi ) ); // 5
vertices->push_back( WVector3d( 1, 0, -phi ) ); // 6
vertices->push_back( WVector3d( -1, 0, -phi ) ); // 7
vertices->push_back( WVector3d_2( 0, phi, 1 ) ); // 8
vertices->push_back( WVector3d_2( 0, -phi, 1 ) ); // 9
vertices->push_back( WVector3d_2( 0, phi, -1 ) ); // 10
vertices->push_back( WVector3d_2( 0, -phi, -1 ) ); // 11
vertices->push_back( WVector3d( 0, phi, 1 ) ); // 8
vertices->push_back( WVector3d( 0, -phi, 1 ) ); // 9
vertices->push_back( WVector3d( 0, phi, -1 ) ); // 10
vertices->push_back( WVector3d( 0, -phi, -1 ) ); // 11
for( std::vector< WVector3d_2 >::iterator it = vertices->begin(); it != vertices->end(); ++it )
for( std::vector< WVector3d >::iterator it = vertices->begin(); it != vertices->end(); ++it )
{
*it = normalize( *it );
}
......@@ -111,9 +111,9 @@ void tesselateIcosahedron( std::vector< WVector3d_2 >* vertices, std::vector< un
utility::Edge e( ( *triangles )[ 3 * k + i ], ( *triangles )[ 3 * k + ( i + 1 ) % 3 ] );
if( edgeVertices.find( e ) == edgeVertices.end() )
{
WVector3d_2 v0 = vertices->at( e.first );
WVector3d_2 v1 = vertices->at( e.second );
WVector3d_2 v = v0 + v1;
WVector3d v0 = vertices->at( e.first );
WVector3d v1 = vertices->at( e.second );
WVector3d v = v0 + v1;
v = normalize( v );
vertices->push_back( v );
edgeVertices[ e ] = vertices->size() - 1;
......
......@@ -87,6 +87,6 @@ namespace utility
* \param[out] triangles The resulting triangles as a list of indices into the vertex vector.
* \param level The tesselation level.
*/
void OWCOMMON_EXPORT tesselateIcosahedron( std::vector< WVector3d_2 >* vertices, std::vector< unsigned int >* triangles, unsigned int level );
void OWCOMMON_EXPORT tesselateIcosahedron( std::vector< WVector3d >* vertices, std::vector< unsigned int >* triangles, unsigned int level );
#endif // WGEOMETRYFUNCTIONS_H
......@@ -37,17 +37,17 @@
#include "WPolynomialEquationSolvers.h"
#include "linearAlgebra/WLinearAlgebra.h"
WLine::WLine( const std::vector< WPosition_2 > &points )
: WMixinVector< WPosition_2 >( points )
WLine::WLine( const std::vector< WPosition > &points )
: WMixinVector< WPosition >( points )
{
}
WLine::WLine()
: WMixinVector< WPosition_2 >()
: WMixinVector< WPosition >()
{
}
const WPosition_2& midPoint( const WLine& line )
const WPosition& midPoint( const WLine& line )
{
if( line.empty() )
{
......@@ -92,7 +92,7 @@ void WLine::resampleByNumberOfPoints( size_t numPoints )
// TODO(math): fix numerical issuses: newSegmentLength may be wrong => great offset by many intraSegment sample points
// remainingLength may be wrong => ...
// Take a look at the unit test testNumericalStabilityOfResampling
WPosition_2 newPoint = at( i + 1 ) + remainingLength * normalize( at( i ) - at( i + 1 ) );
WPosition newPoint = at( i + 1 ) + remainingLength * normalize( at( i ) - at( i + 1 ) );
newLine.push_back( newPoint );
// std::cout << "line size so far" << newLine.size() << " lenght so far: " << newLine.pathLength() << std::endl;
// std::cout << numPoints - newLine.size() << std::endl;
......@@ -113,7 +113,7 @@ void WLine::resampleByNumberOfPoints( size_t numPoints )
}
if( size() != numPoints )
{
this->WMixinVector< WPosition_2 >::operator=( newLine );
this->WMixinVector< WPosition >::operator=( newLine );
}
// Note if the size() == 0, then the resampled tract is also of length 0
}
......@@ -137,7 +137,7 @@ void WLine::removeAdjacentDuplicates()
newLine.push_back( *cit );
}
}
this->WMixinVector< WPosition_2 >::operator=( newLine );
this->WMixinVector< WPosition >::operator=( newLine );
}
void WLine::resampleBySegmentLength( double newSegmentLength )
......@@ -155,7 +155,7 @@ void WLine::resampleBySegmentLength( double newSegmentLength )
{
if( length( newLine.back() - ( *this )[i] ) > newSegmentLength )
{
const WPosition_2& pred = ( *this )[i - 1];
const WPosition& pred = ( *this )[i - 1];
if( pred == newLine.back() )
{
// Then there is no triangle and the old Segment Length is bigger as the new segment
......@@ -185,7 +185,7 @@ void WLine::resampleBySegmentLength( double newSegmentLength )
// NOTE: if those asserts fire, then this algo is wrong and produces wrong results, and I've to search to bug!
WAssert( std::imag( solution.first ) == 0.0, "Invalid quadratic equation while computing resamplingBySegmentLength" );
WAssert( std::imag( solution.second ) == 0.0, "Invalid quadratic equation while computing resamplingBySegmentLength" );
WPosition_2 pointOfIntersection;
WPosition pointOfIntersection;
if( std::real( solution.first ) > 0.0 )
{
pointOfIntersection = pred + std::real( solution.first ) * ( ( *this )[i] - pred );
......@@ -201,10 +201,10 @@ void WLine::resampleBySegmentLength( double newSegmentLength )
}
if( length( newLine.back() - ( *this )[size() - 1] ) > newSegmentLength / 2.0 )
{
WVector3d_2 direction = normalize( ( *this )[size() - 1] - newLine.back() );
WVector3d direction = normalize( ( *this )[size() - 1] - newLine.back() );
newLine.push_back( newLine.back() + direction * newSegmentLength );
}
this->WMixinVector< WPosition_2 >::operator=( newLine );
this->WMixinVector< WPosition >::operator=( newLine );
}
int equalsDelta( const WLine& line, const WLine& other, double delta )
......@@ -214,7 +214,7 @@ int equalsDelta( const WLine& line, const WLine& other, double delta )
bool sameLines = true;
for( diffPos = 0; ( diffPos < pts ) && sameLines; ++diffPos )
{
for( int x = 0; x < 3; ++x ) // since WLine uses WPosition_2 as elements there are 3 components per position
for( int x = 0; x < 3; ++x ) // since WLine uses WPosition as elements there are 3 components per position
{
sameLines = sameLines && ( std::abs( line[diffPos][x] - other[diffPos][x] ) <= delta );
}
......
......@@ -38,9 +38,9 @@
class WLineTest;
/**
* A line is an ordered sequence of WPosition_2s.
* A line is an ordered sequence of WPositions.
*/
class OWCOMMON_EXPORT WLine : public WMixinVector< WPosition_2 >
class OWCOMMON_EXPORT WLine : public WMixinVector< WPosition >
{
public:
/**
......@@ -48,7 +48,7 @@ public:
*
* \param points Point sequence
*/
explicit WLine( const std::vector< WPosition_2 > &points );
explicit WLine( const std::vector< WPosition > &points );
/**
* Creates an empty line.
......@@ -114,7 +114,7 @@ OWCOMMON_EXPORT double pathLength( const WLine& line );
*
* \return Const reference to the midpoint element.
*/
OWCOMMON_EXPORT const WPosition_2& midPoint( const WLine& line );
OWCOMMON_EXPORT const WPosition& midPoint( const WLine& line );
/**
* Compares two lines with each other point wise upto a given delta.
......
......@@ -33,16 +33,16 @@
#include "WMatrix.h"
#include "linearAlgebra/WLinearAlgebra.h"
WVector3d_2 multMatrixWithVector3D( WMatrix<double> mat, WVector3d_2 vec )
WVector3d multMatrixWithVector3D( WMatrix<double> mat, WVector3d vec )
{
WVector3d_2 result;
WVector3d result;
result[0] = mat( 0, 0 ) * vec[0] + mat( 0, 1 ) * vec[1] + mat( 0, 2 ) * vec[2];
result[1] = mat( 1, 0 ) * vec[0] + mat( 1, 1 ) * vec[1] + mat( 1, 2 ) * vec[2];
result[2] = mat( 2, 0 ) * vec[0] + mat( 2, 1 ) * vec[1] + mat( 2, 2 ) * vec[2];
return result;
}
WVector3d_2 transformVector3DWithMatrix4D( WMatrix<double> mat, WVector3d_2 vec )
WVector3d transformVector3DWithMatrix4D( WMatrix<double> mat, WVector3d vec )
{
WAssert( mat.getNbRows() == 4 && mat.getNbCols() == 4, "Matrix has wrong size." );
std::vector< double > resultVec4D( 4 );
......@@ -51,14 +51,14 @@ WVector3d_2 transformVector3DWithMatrix4D( WMatrix<double> mat, WVector3d_2 vec
resultVec4D[2] = mat( 2, 0 ) * vec[0] + mat( 2, 1 ) * vec[1] + mat( 2, 2 ) * vec[2] /* + mat( 2, 3 ) * 0 */;
resultVec4D[3] = mat( 3, 0 ) * vec[0] + mat( 3, 1 ) * vec[1] + mat( 3, 2 ) * vec[2] /* + mat( 3, 3 ) * 0 */;
WVector3d_2 result;
WVector3d result;
result[0] = resultVec4D[0] / resultVec4D[3];
result[1] = resultVec4D[1] / resultVec4D[3];
result[2] = resultVec4D[2] / resultVec4D[3];
return result;
}
WPosition_2 transformPosition3DWithMatrix4D( WMatrix<double> mat, WPosition_2 vec )
WPosition transformPosition3DWithMatrix4D( WMatrix<double> mat, WPosition vec )
{
WAssert( mat.getNbRows() == 4 && mat.getNbCols() == 4, "Matrix has wrong size." );
std::vector< double > resultVec4D( 4 );
......@@ -67,7 +67,7 @@ WPosition_2 transformPosition3DWithMatrix4D( WMatrix<double> mat, WPosition_2 ve
resultVec4D[2] = mat( 2, 0 ) * vec[0] + mat( 2, 1 ) * vec[1] + mat( 2, 2 ) * vec[2] + mat( 2, 3 ) * 1;
resultVec4D[3] = mat( 3, 0 ) * vec[0] + mat( 3, 1 ) * vec[1] + mat( 3, 2 ) * vec[2] + mat( 3, 3 ) * 1;
WPosition_2 result;
WPosition result;
result[0] = resultVec4D[0] / resultVec4D[3];
result[1] = resultVec4D[1] / resultVec4D[3];
result[2] = resultVec4D[2] / resultVec4D[3];
......@@ -283,9 +283,9 @@ WMatrix<double> invertMatrix4x4( WMatrix<double> mat )
return result;
}
bool linearIndependent( const WVector3d_2& u, const WVector3d_2& v )
bool linearIndependent( const WVector3d& u, const WVector3d& v )
{
WVector3d_2 cp = cross( u, v );
WVector3d cp = cross( u, v );
if( std::fabs( cp[0] ) < wlimits::DBL_EPS && std::fabs( cp[1] ) < wlimits::DBL_EPS && std::fabs( cp[2] ) < wlimits::DBL_EPS )
{
return false;
......
......@@ -37,7 +37,7 @@ template< typename > class WMatrix;
* \param mat 3x3 matrix
* \param vec vector
*/
WVector3d_2 OWCOMMON_EXPORT multMatrixWithVector3D( WMatrix<double> mat, WVector3d_2 vec );
WVector3d OWCOMMON_EXPORT multMatrixWithVector3D( WMatrix<double> mat, WVector3d vec );
/**
* Applies a coordinate transformation in homogenous coordinates to a vector.
......@@ -46,7 +46,7 @@ WVector3d_2 OWCOMMON_EXPORT multMatrixWithVector3D( WMatrix<double> mat, WVector
* \param mat 4x4 matrix
* \param vec vector
*/
WVector3d_2 OWCOMMON_EXPORT transformVector3DWithMatrix4D( WMatrix<double> mat, WVector3d_2 vec );
WVector3d OWCOMMON_EXPORT transformVector3DWithMatrix4D( WMatrix<double> mat, WVector3d vec );
/**
* Applies a coordinate transformation in homogenous coordinates to a position.
......@@ -55,7 +55,7 @@ WVector3d_2 OWCOMMON_EXPORT transformVector3DWithMatrix4D( WMatrix<double> mat,
* \param mat 4x4 matrix
* \param vec vector
*/
WPosition_2 OWCOMMON_EXPORT transformPosition3DWithMatrix4D( WMatrix<double> mat, WPosition_2 vec );
WPosition OWCOMMON_EXPORT transformPosition3DWithMatrix4D( WMatrix<double> mat, WPosition vec );
/**
* helper routine to invert a 3x3 matrix
......@@ -85,7 +85,7 @@ WMatrix<double> OWCOMMON_EXPORT invertMatrix4x4( WMatrix<double> mat );
*
* \note This check is performed with the cross product != (0,0,0) but in numerical stability with FLT_EPS.
*/
bool OWCOMMON_EXPORT linearIndependent( const WVector3d_2& u, const WVector3d_2& v );
bool OWCOMMON_EXPORT linearIndependent( const WVector3d& u, const WVector3d& v );
/**
* Computes the SVD for the Matrix \param A
......
......@@ -25,14 +25,13 @@
#include "WMath.h"
#include "WPlane.h"
#include "linearAlgebra/WLinearAlgebra.h"
#include "linearAlgebra/WLinearAlgebra.h"
#include "../WAssert.h"
#include "../WLimits.h"
bool testIntersectTriangle( const WPosition_2& p1, const WPosition_2& p2, const WPosition_2& p3, const WPlane& p )
bool testIntersectTriangle( const WPosition& p1, const WPosition& p2, const WPosition& p3, const WPlane& p )
{
const WVector3d_2& normal = p.getNormal();
const WPosition_2& planePoint = p.getPosition();
const WVector3d& normal = p.getNormal();
const WPosition& planePoint = p.getPosition();
double r1 = dot( normal, p1 - planePoint );
double r2 = dot( normal, p2 - planePoint );
......@@ -47,11 +46,11 @@ bool testIntersectTriangle( const WPosition_2& p1, const WPosition_2& p2, const
}
bool intersectPlaneSegment( const WPlane& p,
const WPosition_2& p1,
const WPosition_2& p2,
boost::shared_ptr< WPosition_2 > pointOfIntersection )
const WPosition& p1,
const WPosition& p2,
boost::shared_ptr< WPosition > pointOfIntersection )
{
const WVector3d_2& normal = normalize( p.getNormal() );
const WVector3d& normal = normalize( p.getNormal() );
double const d = dot( normal, p.getPosition() );
WAssert( pointOfIntersection.get(), "Place to store a point of intersection is not ready!" );
*pointOfIntersection = p.getPosition(); // otherwise it would be undefined
......@@ -84,15 +83,15 @@ bool intersectPlaneSegment( const WPlane& p,
return false;
}
bool intersectPlaneLineNearCP( const WPlane& p, const WLine& l, boost::shared_ptr< WPosition_2 > cutPoint )
bool intersectPlaneLineNearCP( const WPlane& p, const WLine& l, boost::shared_ptr< WPosition > cutPoint )
{
bool result = false;
double minDistance = wlimits::MAX_DOUBLE;
WAssert( cutPoint.get(), "Place to store a point of intersection is not ready!" );
*cutPoint = WPosition_2( 0, 0, 0 );
*cutPoint = WPosition( 0, 0, 0 );
for( size_t i = 1; i < l.size(); ++i ) // test each segment
{
boost::shared_ptr< WPosition_2 > cP( new WPosition_2( 0, 0, 0 ) );
boost::shared_ptr< WPosition > cP( new WPosition( 0, 0, 0 ) );
if( intersectPlaneSegment( p, l[i-1], l[i], cP ) )
{
result = true;
......
......@@ -37,7 +37,6 @@
#include "WLine.h"
#include "WPlane.h"
#include "linearAlgebra/WLinearAlgebra.h"
#include "linearAlgebra/WLinearAlgebra.h"
/**
* Classes and functions of math module of OpenWalnut.
......@@ -82,7 +81,7 @@ inline int myIsfinite( double number )
*
* \return True if both intersects otherwise false.
*/
bool OWCOMMON_EXPORT testIntersectTriangle( const WPosition_2& p1, const WPosition_2& p2, const WPosition_2& p3, const WPlane& p );
bool OWCOMMON_EXPORT testIntersectTriangle( const WPosition& p1, const WPosition& p2, const WPosition& p3, const WPlane& p );
/**
* Checks if the given segment intersects with the plane or not. Even if
......@@ -99,9 +98,9 @@ bool OWCOMMON_EXPORT testIntersectTriangle( const WPosition_2& p1, const WPositi
* \return True if an intersection was detected, false otherwise.
*/
bool OWCOMMON_EXPORT intersectPlaneSegment( const WPlane& p,
const WPosition_2& p1,
const WPosition_2& p2,
boost::shared_ptr< WPosition_2 > pointOfIntersection );
const WPosition& p1,
const WPosition& p2,
boost::shared_ptr< WPosition > pointOfIntersection );
/**
* Checks a line (consecutive line segments) on intersection with a plane
......@@ -114,7 +113,7 @@ bool OWCOMMON_EXPORT intersectPlaneSegment( const WPlane& p,
*
* \return True if an intersection was detected, false otherwise.
*/
bool OWCOMMON_EXPORT intersectPlaneLineNearCP( const WPlane& p, const WLine& l, boost::shared_ptr< WPosition_2 > cutPoint );
bool OWCOMMON_EXPORT intersectPlaneLineNearCP( const WPlane& p, const WLine& l, boost::shared_ptr< WPosition > cutPoint );
/**
* Computes the signum for the given value.
......
......@@ -70,7 +70,7 @@ public:
*
* \param newMatrix the matrix to copy
*/
WMatrix( const WMatrix4d_2& newMatrix ); // NOLINT
WMatrix( const WMatrix4d& newMatrix ); // NOLINT
/**
* Makes the matrix contain the identity matrix, i.e. 1 on the diagonal.
......@@ -108,7 +108,7 @@ public:
*
* \return casted matrix
*/
operator WMatrix4d_2() const;
operator WMatrix4d() const;
/**
* Cast this matrix to an 4x4 osg matrix if it is a 4x4 matrix.
......@@ -151,7 +151,7 @@ public:
* Multiplication with a vector.
* \param rhs The right hand side of the multiplication
*/
WVector3d_2 operator*( const WVector3d_2& rhs ) const;
WVector3d operator*( const WVector3d& rhs ) const;
/**
* Returns the transposed matrix.
......@@ -185,7 +185,7 @@ template< typename T > WMatrix< T >::WMatrix( const WMatrix& newMatrix )
m_nbCols = newMatrix.m_nbCols;
}
template< typename T > WMatrix< T >::WMatrix( const WMatrix4d_2& newMatrix )
template< typename T > WMatrix< T >::WMatrix( const WMatrix4d& newMatrix )
: WValue< T >( 4 * 4 )
{
m_nbCols = 4;
......@@ -198,11 +198,11 @@ template< typename T > WMatrix< T >::WMatrix( const WMatrix4d_2& newMatrix )
}
}
template< typename T > WMatrix< T >::operator WMatrix4d_2() const
template< typename T > WMatrix< T >::operator WMatrix4d() const
{
size_t nbRows = this->size() / m_nbCols;
WAssert( m_nbCols == 4 && nbRows == 4, "This is no 4x4 matrix." );
WMatrix4d_2 m;
WMatrix4d m;
for( size_t i = 0; i < nbRows; ++i )
{
for( size_t j = 0; j < m_nbCols; ++j )
......@@ -375,10 +375,10 @@ template< typename T > WValue< T > WMatrix< T >::operator*( const WValue< T >& r