changed template from vcg::Triangle to generic class to allow to pass a vcg::FaceSimpX (recall: the disambiguation was done in the function name exactly for this reason)
This commit is contained in:
parent
3c69c98cd8
commit
3cb29c805b
|
@ -249,15 +249,15 @@ namespace vcg {
|
|||
* while in the second item is stored the penetration depth
|
||||
* \return true iff there is an intersection between the sphere and the triangle
|
||||
*/
|
||||
template < class SCALAR_TYPE >
|
||||
template < class SCALAR_TYPE, class TRIANGLETYPE >
|
||||
bool IntersectionSphereTriangle(const vcg::Sphere3 < SCALAR_TYPE > & sphere ,
|
||||
const vcg::Triangle3< SCALAR_TYPE > & triangle,
|
||||
TRIANGLETYPE triangle,
|
||||
vcg::Point3 < SCALAR_TYPE > & witness ,
|
||||
std::pair< SCALAR_TYPE, SCALAR_TYPE > * res=NULL)
|
||||
{
|
||||
typedef SCALAR_TYPE ScalarType;
|
||||
typedef typename vcg::Point3< ScalarType > Point3t;
|
||||
typedef typename vcg::Triangle3< ScalarType > Triangle3t;
|
||||
typedef typename TRIANGLETYPE Triangle3t;
|
||||
|
||||
bool penetration_detected = false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue