Last active
August 29, 2015 14:07
-
-
Save potpath/4cffa5e97338e4c01c59 to your computer and use it in GitHub Desktop.
check positive span for 4 fingers using Qhull
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<Qhull.h> | |
#include<QhullFacetList.h> | |
using namespace orgQhull; | |
bool isPositiveSpan(const Point3d &n1,const Point3d &n2,const Point3d &n3,const Point3d &n4){ | |
Qhull qhull; | |
realT points[12]={n1.x,n1.y,n1.z,n2.x,n2.y,n2.z,n3.x,n3.y,n3.z,n4.x,n4.y,n4.z}; | |
qhull.runQhull("",3,4,points,""); | |
vector<QhullFacet> facets=qhull.facetList().toStdVector(); | |
for(const QhullFacet &facet : qhull.facetList().toStdVector()) | |
if(facet.getFacetT()->offset>=0) return false; | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-Dqh_QHpointer
-I/usr/include/libqhullcpp
-lqhullcpp
-lqhull