Commit 2f1a8df9 authored by Jan Möbius's avatar Jan Möbius
Browse files

Merge branch 'fixMSVCCommunity' into 'master'

fixes #50

Plugin Polyline was not compiling with msvc community 2015 as the  RayCollision could not be declared and initialized by a return value at the same time. now the variable is first declared and then initialized by a function return value in two steps.

See merge request !104
parents 09a03096 9e3037c6
Pipeline #2031 passed with stage
in 78 minutes and 2 seconds
...@@ -70,7 +70,8 @@ getPointOnMesh(PolyLineBezierSplineData* _SplineData, ACG::Vec3d _point, ACG::Ve ...@@ -70,7 +70,8 @@ getPointOnMesh(PolyLineBezierSplineData* _SplineData, ACG::Vec3d _point, ACG::Ve
ACG::Vec3d nor = mesh->mesh()->normal(neigh.handle); ACG::Vec3d nor = mesh->mesh()->normal(neigh.handle);
if(_nor) if(_nor)
*_nor = nor; *_nor = nor;
OpenMeshTriangleBSPT<TriMesh>::RayCollision rayInt = bsp->raycollision(_point, nor); OpenMeshTriangleBSPT<TriMesh>::RayCollision rayInt;
rayInt = bsp->raycollision(_point, nor);
if(rayInt.size()) if(rayInt.size())
return _point + nor * rayInt[0].second; return _point + nor * rayInt[0].second;
return _point + nor.normalize() * neigh.dist; return _point + nor.normalize() * neigh.dist;
...@@ -82,7 +82,8 @@ struct Onb { ...@@ -82,7 +82,8 @@ struct Onb {
bool PolyLinePlugin::createCircle_getPointOnMesh(TriMeshObject* _triMeshObject, ACG::Vec3d _center, bool PolyLinePlugin::createCircle_getPointOnMesh(TriMeshObject* _triMeshObject, ACG::Vec3d _center,
ACG::Vec3d _pOnPlane, ACG::Vec3d _n, ACG::Vec3d* _pOut) { ACG::Vec3d _pOnPlane, ACG::Vec3d _n, ACG::Vec3d* _pOut) {
OpenMeshTriangleBSPT<TriMesh>* bsp = _triMeshObject->requestTriangleBsp(); 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()) if (rayInt.empty())
return false; return false;
Supports Markdown
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