27 #include <boost/shared_ptr.hpp>
29 #include "../../common/math/WLinearAlgebraFunctions.h"
30 #include "../../common/math/linearAlgebra/WLinearAlgebra.h"
31 #include "../../common/WAssert.h"
32 #include "../../common/WLimits.h"
69 boost::shared_ptr< std::set< WPosition > >
WPlane::samplePoints(
double stepWidth,
size_t numX,
size_t numY )
const
72 boost::shared_ptr< std::set< WPosition > > result(
new std::set< WPosition >() );
77 result->insert(
m_pos );
78 for(
size_t i = 0; i < numY; ++i )
80 for(
size_t j = 0; j < numX; ++j )
86 result->insert(
m_pos -
id * ycrement - jd * xcrement );
87 result->insert(
m_pos +
id * ycrement - jd * xcrement );
88 result->insert(
m_pos -
id * ycrement + jd * xcrement );
89 result->insert(
m_pos +
id * ycrement + jd * xcrement );
164 std::stringstream msg;
165 msg <<
"The give two vectors are not perpendicular to plane. First: " << first <<
" second: " << second <<
" for plane normal: " <<
m_normal;
168 std::stringstream msg2;
169 msg2 <<
"The given two vectors are not linear independent!: " << first <<
" and " << second;
170 WAssert( linearIndependent( first, second ), msg2.str() );