Skip to content

Compilation error in Math functions #1

Description

@abhinavdhere

CGAL is now available through snap package on Ubuntu 18.04 and thus problem of CGAL dependency is resolved. On running the CMakeLists.txt after commenting the error message for CGAL, the configure works. On running make, however, I get the following errors,

`Scanning dependencies of target retiler
[ 7%] Building CXX object CMakeFiles/retiler.dir/src/Mesh.cpp.o
[ 15%] Building CXX object CMakeFiles/retiler.dir/src/MeshEx.cpp.o
In file included from /home/abhinav/Documents/My Profile/retiler/src/MeshEx.cpp:2:0:
/home/abhinav/Documents/My Profile/retiler/src/MeshEx.h:157:211: error: cannot bind non-const lvalue reference of type ‘std::vector<std::pair<math::Vec3, math::Vec2 > >&’ to an rvalue of type ‘std::vector<std::pair<math::Vec3, math::Vec2 > >’
vector<std::pair<math::Vec3f, math::Vec2f> > &interiorPoints = std::vector<std::pair<math::Vec3f, math::Vec2f> >() );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/abhinav/Documents/My Profile/retiler/src/MeshEx.cpp: In member function ‘MeshEx::Edge* MeshEx::Triangle::getEdge(MeshEx::Vertex*, MeshEx::Vertex*)’:

/home/abhinav/Documents/My Profile/retiler/src/MeshEx.cpp:1102:9: error: cannot convert ‘bool’ to ‘MeshEx::Edge*’ in return
return false;
^~~~~
/home/abhinav/Documents/My Profile/retiler/src/MeshEx.cpp: In member function ‘bool MeshEx::Edge::intersectsPlane(const Vec3f&, const float&, math::Vec3f&)’:
/home/abhinav/Documents/My Profile/retiler/src/MeshEx.cpp:1303:43: error: ‘Ray3d’ is not a member of ‘math’
return math::intersectionRayPlane( math::Ray3d( v1->position, v2->position ), normal, distance, intersectionPoint );
^~~~~
/home/abhinav/Documents/My Profile/retiler/src/MeshEx.cpp:1303:43: note: suggested alternative: ‘Ray3f’

return math::intersectionRayPlane( math::Ray3d( v1->position, v2->position ), normal, distance, intersectionPoint );
^~~~~
Ray3f
/home/abhinav/Documents/My Profile/retiler/src/MeshEx.cpp: In member function ‘bool MeshEx::Edge::intersectsLine(const Vec3f&, const Vec3f&, math::Vec3f&)’:
/home/abhinav/Documents/My Profile/retiler/src/MeshEx.cpp:1311:41: error: ‘Ray3d’ is not a member of ‘math’

return math::intersectionRayRay( math::Ray3d( v1->position, v2->position ), math::Ray3d( p1, p2 ), intersectionPoint );
^~~~~
/home/abhinav/Documents/My Profile/retiler/src/MeshEx.cpp:1311:41: note: suggested alternative: ‘Ray3f’
return math::intersectionRayRay( math::Ray3d( v1->position, v2->position ), math::Ray3d( p1, p2 ), intersectionPoint );
^~~~~
Ray3f
/home/abhinav/Documents/My Profile/retiler/src/MeshEx.cpp:1311:84: error: ‘Ray3d’ is not a member of ‘math’
ntersectionRayRay( math::Ray3d( v1->position, v2->position ), math::Ray3d( p1, p2 ), intersectionPoint );
^~~~~
/home/abhinav/Documents/My Profile/retiler/src/MeshEx.cpp:1311:84: note: suggested alternative: ‘Ray3f’
ntersectionRayRay( math::Ray3d( v1->position, v2->position ), math::Ray3d( p1, p2 ), intersectionPoint );
^~~~~
Ray3f
/home/abhinav/Documents/My Profile/retiler/src/MeshEx.cpp: In member function ‘bool MeshEx::Edge::intersectsLine(const Vec3f&, const Vec3f&)’:
/home/abhinav/Documents/My Profile/retiler/src/MeshEx.cpp:1322:41: error: ‘Ray3d’ is not a member of ‘math’
return math::intersectionRayRay( math::Ray3d( v1->position, v2->position ), math::Ray3d( p1, p2 ), intersection );
^~~~~
/home/abhinav/Documents/My Profile/retiler/src/MeshEx.cpp:1322:41: note: suggested alternative: ‘Ray3f’
return math::intersectionRayRay( math::Ray3d( v1->position, v2->position ), math::Ray3d( p1, p2 ), intersection );
^~~~~
Ray3f
/home/abhinav/Documents/My Profile/retiler/src/MeshEx.cpp:1322:84: error: ‘Ray3d’ is not a member of ‘math’
ntersectionRayRay( math::Ray3d( v1->position, v2->position ), math::Ray3d( p1, p2 ), intersection );
^~~~~
/home/abhinav/Documents/My Profile/retiler/src/MeshEx.cpp:1322:84: note: suggested alternative: ‘Ray3f’
ntersectionRayRay( math::Ray3d( v1->position, v2->position ), math::Ray3d( p1, p2 ), intersection );
^~~~~
Ray3f
CMakeFiles/retiler.dir/build.make:86: recipe for target 'CMakeFiles/retiler.dir/src/MeshEx.cpp.o' failed
make[2]: *** [CMakeFiles/retiler.dir/src/MeshEx.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/retiler.dir/all' failed
make[1]: *** [CMakeFiles/retiler.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions