+
+ /*!
+ * \param [in] startOfSeg - input coming from intersectSegments or intersectSegmentsInternal
+ * \param [in] endOfSeg - input coming from intersectSegments or intersectSegmentsInternal. Assume that endOfSeg>startOfSeg.
+ * \param [in] pt - position of point that the method computes the bary coords for.
+ */
+ template<class MyMeshType, class MyMatrix>
+ bool CurveIntersector<MyMeshType,MyMatrix>::ComputeBaryCoordsOf(double startOfSeg, double endOfSeg, double pt, double& startPos, double& endPos)
+ {
+ double deno(endOfSeg-startOfSeg);
+ startPos=(endOfSeg-pt)/deno;
+ endPos=1.-startPos;
+ return startPos>=0. && endPos>=0.;
+ }