Correct a function name to match attribute order
IntersectionPlaneLine(line,plane) -> IntersectionPlaneLine(plane,line)
This commit is contained in:
parent
f4cf3b9221
commit
5bb5c1a1eb
|
@ -217,10 +217,9 @@ namespace vcg {
|
||||||
return penetration_detected;
|
return penetration_detected;
|
||||||
}; //end of IntersectionSphereTriangle
|
}; //end of IntersectionSphereTriangle
|
||||||
|
|
||||||
|
|
||||||
/// intersection between line and plane
|
/// intersection between line and plane
|
||||||
template<class T>
|
template<class T>
|
||||||
inline bool IntersectionLinePlane( const Plane3<T> & pl, const Line3<T> & li, Point3<T> & po){
|
inline bool IntersectionPlaneLine( const Plane3<T> & pl, const Line3<T> & li, Point3<T> & po){
|
||||||
const T epsilon = T(1e-8);
|
const T epsilon = T(1e-8);
|
||||||
|
|
||||||
T k = pl.Direction().dot(li.Direction()); // Compute 'k' factor
|
T k = pl.Direction().dot(li.Direction()); // Compute 'k' factor
|
||||||
|
@ -229,6 +228,12 @@ namespace vcg {
|
||||||
T r = (pl.Offset() - pl.Direction().dot(li.Origin()))/k; // Compute ray distance
|
T r = (pl.Offset() - pl.Direction().dot(li.Origin()))/k; // Compute ray distance
|
||||||
po = li.Origin() + li.Direction()*r;
|
po = li.Origin() + li.Direction()*r;
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
/// intersection between line and plane
|
||||||
|
template<class T>
|
||||||
|
inline bool IntersectionLinePlane(const Line3<T> & li, const Plane3<T> & pl, Point3<T> & po){
|
||||||
|
|
||||||
|
return IntersectionPlaneLine(pl,li,po);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// intersection between segment and plane
|
/// intersection between segment and plane
|
||||||
|
|
Loading…
Reference in New Issue