// call vertex, facet, and edge drop methods on input Triangle t bool MillingCutter::dropCutter(CLPoint &cl, const Triangle &t) const { bool facet, vertex, edge; /* // alternative ordering of the tests: if (cl.below(t)) vertexDrop(cl,t); // optimisation: if we are now above the triangle we don't need facet and edge if ( cl.below(t) ) { facetDrop(cl,t); edgeDrop(cl,t); }*/ if (cl.below(t)) { facet = facetDrop(cl,t); // if we make contact with the facet... if (!facet) { // ...then we will not hit an edge/vertex, so don't check for that vertex = vertexDrop(cl,t); if ( cl.below(t) ) { edge = edgeDrop(cl,t); } } } return ( facet || vertex || edge ); }
// call vertex, facet, and edge drop methods on input Triangle t bool MillingCutter::dropCutter(CLPoint &cl, const Triangle &t) const { bool facet, vertex, edge; /* // alternative ordering of the tests: if (cl.below(t)) vertexDrop(cl,t); // optimisation: if we are now above the triangle we don't need facet and edge if ( cl.below(t) ) { facetDrop(cl,t); edgeDrop(cl,t); }*/ if (cl.below(t)) { facet = facetDrop(cl,t); if (!facet) { vertex = vertexDrop(cl,t); if ( cl.below(t) ) { edge = edgeDrop(cl,t); } } } return ( facet || vertex || edge ); }