Commit 809ce2a0 authored by Martin Schultz's avatar Martin Schultz

Merge branch 'master' into feature_CMAKE_Folders_MSVC

parents 2b2e0b39 d189835e
Pipeline #2038 passed with stage
in 77 minutes and 48 seconds
......@@ -361,7 +361,8 @@ TEST_F(BSP_CUBE_BASE, RayIntersectionAboveSurface_NonDirectionalFunction_1 ) {
Mesh::Point yDirection(0.0,1.0,0.0);
Mesh::Point p1(-0.5,-2.0,0.0);
BSP::RayCollision rc = bsp_->raycollision(p1,yDirection);
BSP::RayCollision rc;
rc = bsp_->raycollision(p1,yDirection);
EXPECT_EQ(2u, rc.size() ) << "Wrong number of hit faces in ray collision test 1";
if ( rc.size() == 2u ) { // Don't crash on wrong size
......@@ -394,7 +395,8 @@ TEST_F(BSP_CUBE_BASE, RayIntersectionAboveSurface_NonDirectionalFunction_Negativ
Mesh::Point nyDirection(0.0,-1.0,0.0);
Mesh::Point p1(-0.5,-2.0,0.0);
BSP::RayCollision rc = bsp_->raycollision(p1,nyDirection);
BSP::RayCollision rc;
rc = bsp_->raycollision(p1,nyDirection);
EXPECT_EQ(2u, rc.size() ) << "Wrong number of hit faces in ray collision test 1";
if ( rc.size() == 2u ) { // Don't crash on wrong size
......@@ -422,7 +424,8 @@ TEST_F(BSP_CUBE_BASE, RayIntersectionAboveSurface_NonDirectionalFunction_2 ) {
Mesh::Point yDirection(0.0,1.0,0.0);
Mesh::Point p1(0.5,-2.0,0.0);
BSP::RayCollision rc = bsp_->raycollision(p1,yDirection);
BSP::RayCollision rc;
rc = bsp_->raycollision(p1,yDirection);
EXPECT_EQ(2u, rc.size() ) << "Wrong number of hit faces in ray collision test 2";
if ( rc.size() == 2u ) { // Don't crash on wrong size
......@@ -452,7 +455,8 @@ TEST_F(BSP_CUBE_BASE, RayIntersectionAboveSurface_NonDirectionalFunction_Negativ
Mesh::Point nyDirection(0.0,-1.0,0.0);
Mesh::Point p1(0.5,-2.0,0.0);
BSP::RayCollision rc = bsp_->raycollision(p1,nyDirection);
BSP::RayCollision rc;
rc = bsp_->raycollision(p1,nyDirection);
EXPECT_EQ(2u, rc.size() ) << "Wrong number of hit faces in ray collision test 2";
if ( rc.size() == 2u ) { // Don't crash on wrong size
......@@ -489,7 +493,8 @@ TEST_F(BSP_CUBE_BASE, RayIntersectionAboveSurface_DirectionalFunction_1 ) {
Mesh::Point yDirection(0.0,1.0,0.0);
Mesh::Point origin(-0.5,-2.0,0.0);
BSP::RayCollision rc = bsp_->directionalRaycollision(origin,yDirection);
BSP::RayCollision rc;
rc = bsp_->directionalRaycollision(origin,yDirection);
EXPECT_EQ(2u, rc.size() ) << "Wrong number of hit faces in ray collision test 1";
if ( rc.size() == 2u ) { // Don't crash on wrong size
......@@ -545,7 +550,8 @@ TEST_F(BSP_CUBE_BASE, RayIntersectionAboveSurface_DirectionalFunction_NegativeDi
Mesh::Point nyDirection(0.0,-1.0,0.0);
Mesh::Point p1(-0.5,-2.0,0.0);
BSP::RayCollision rc = bsp_->directionalRaycollision(p1,nyDirection);
BSP::RayCollision rc;
rc = bsp_->directionalRaycollision(p1,nyDirection);
EXPECT_EQ(0u, rc.size() ) << "Wrong number of hit faces in ray collision test 1";
......
......@@ -70,7 +70,8 @@ getPointOnMesh(PolyLineBezierSplineData* _SplineData, ACG::Vec3d _point, ACG::Ve
ACG::Vec3d nor = mesh->mesh()->normal(neigh.handle);
if(_nor)
*_nor = nor;
OpenMeshTriangleBSPT<TriMesh>::RayCollision rayInt = bsp->raycollision(_point, nor);
OpenMeshTriangleBSPT<TriMesh>::RayCollision rayInt;
rayInt = bsp->raycollision(_point, nor);
if(rayInt.size())
return _point + nor * rayInt[0].second;
return _point + nor.normalize() * neigh.dist;
......
......@@ -82,7 +82,8 @@ struct Onb {
bool PolyLinePlugin::createCircle_getPointOnMesh(TriMeshObject* _triMeshObject, ACG::Vec3d _center,
ACG::Vec3d _pOnPlane, ACG::Vec3d _n, ACG::Vec3d* _pOut) {
OpenMeshTriangleBSPT<TriMesh>* bsp = _triMeshObject->requestTriangleBsp();
OpenMeshTriangleBSPT<TriMesh>::RayCollision rayInt = bsp->raycollision(_pOnPlane, _n);
OpenMeshTriangleBSPT<TriMesh>::RayCollision rayInt;
rayInt = bsp->raycollision(_pOnPlane, _n);
if (rayInt.empty())
return false;
......
Subproject commit a5dbe44e2decb8272428c78b5641a817a812e281
Subproject commit 91ee22ca2febfb935bbace4c4027f4b93d0bb90d
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