Skip to content
Snippets Groups Projects
Commit 9a6cb01a authored by Karsten Rink's avatar Karsten Rink
Browse files

renamed orient3d-function to orientation3d

parent 7666a74e
No related branches found
No related tags found
No related merge requests found
......@@ -245,25 +245,25 @@ bool isPointInTriangle(GeoLib::Point const& q,
bool isPointInTetrahedron(GeoLib::Point const& p, GeoLib::Point const& a, GeoLib::Point const& b,
GeoLib::Point const& c, GeoLib::Point const& d, double eps)
{
double const d0 (orient3d(d,a,b,c));
double const d0 (orientation3d(d,a,b,c));
// if tetrahedron is not coplanar
if (std::abs(d0) > std::numeric_limits<double>::epsilon())
{
bool const d0_sign (d0>0);
// if p is on the same side of bcd as a
double const d1 (orient3d(d, p, b, c));
double const d1 (orientation3d(d, p, b, c));
if (!(d0_sign == (d1>=0) || std::abs(d1) < eps))
return false;
// if p is on the same side of acd as b
double const d2 (orient3d(d, a, p, c));
double const d2 (orientation3d(d, a, p, c));
if (!(d0_sign == (d2>=0) || std::abs(d2) < eps))
return false;
// if p is on the same side of abd as c
double const d3 (orient3d(d, a, b, p));
double const d3 (orientation3d(d, a, b, p));
if (!(d0_sign == (d3>=0) || std::abs(d3) < eps))
return false;
// if p is on the same side of abc as d
double const d4 (orient3d(p, a, b, c));
double const d4 (orientation3d(p, a, b, c));
if (!(d0_sign == (d4>=0) || std::abs(d4) < eps))
return false;
return true;
......@@ -434,8 +434,8 @@ double scalarTriple(MathLib::Vector3 const& u, MathLib::Vector3 const& v, MathLi
return MathLib::scalarProduct(cross,w);
}
double orient3d(GeoLib::Point const& p,
GeoLib::Point const& a, GeoLib::Point const& b, GeoLib::Point const& c)
double orientation3d(GeoLib::Point const& p,
GeoLib::Point const& a, GeoLib::Point const& b, GeoLib::Point const& c)
{
MathLib::Vector3 const ap (a, p);
MathLib::Vector3 const bp (b, p);
......
......@@ -197,8 +197,8 @@ double scalarTriple(MathLib::Vector3 const& u, MathLib::Vector3 const& v, MathLi
* @return If the triangle abc is ordered counterclockwise when viewed from p, the method will return a negative value,
* otherwise it will return a positive value. If p is coplanar with abc, the function will return 0.
*/
double orient3d(GeoLib::Point const& p,
GeoLib::Point const& a, GeoLib::Point const& b, GeoLib::Point const& c);
double orientation3d(GeoLib::Point const& p,
GeoLib::Point const& a, GeoLib::Point const& b, GeoLib::Point const& c);
/**
* Checks if a and b can be placed on a plane such that c and d lie on different sides of said plane.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment