A class solves polynomial degree (1,2,3) equations. More...
#include <intersect.h>
Static Public Member Functions | |
| static int | solveCubic (FCL_REAL c[4], FCL_REAL s[3]) |
| Solve a cubic function with coefficients c, return roots s and number of roots. | |
| static int | solveLinear (FCL_REAL c[2], FCL_REAL s[1]) |
| Solve a linear equation with coefficients c, return roots s and number of roots. | |
| static int | solveQuadric (FCL_REAL c[3], FCL_REAL s[2]) |
| Solve a quadratic function with coefficients c, return roots s and number of roots. | |
Static Private Member Functions | |
| static bool | cbrt (FCL_REAL v) |
| Compute v^{1/3}. | |
| static bool | isZero (FCL_REAL v) |
| Check whether v is zero. | |
Static Private Attributes | |
| static const FCL_REAL | NEAR_ZERO_THRESHOLD = 1e-9 |
A class solves polynomial degree (1,2,3) equations.
Definition at line 47 of file intersect.h.
| bool fcl::PolySolver::cbrt | ( | FCL_REAL | v | ) | [inline, static, private] |
Compute v^{1/3}.
Definition at line 53 of file intersect.cpp.
| bool fcl::PolySolver::isZero | ( | FCL_REAL | v | ) | [inline, static, private] |
Check whether v is zero.
Definition at line 48 of file intersect.cpp.
| int fcl::PolySolver::solveCubic | ( | FCL_REAL | c[4], |
| FCL_REAL | s[3] | ||
| ) | [static] |
Solve a cubic function with coefficients c, return roots s and number of roots.
Definition at line 100 of file intersect.cpp.
| int fcl::PolySolver::solveLinear | ( | FCL_REAL | c[2], |
| FCL_REAL | s[1] | ||
| ) | [static] |
Solve a linear equation with coefficients c, return roots s and number of roots.
Definition at line 58 of file intersect.cpp.
| int fcl::PolySolver::solveQuadric | ( | FCL_REAL | c[3], |
| FCL_REAL | s[2] | ||
| ) | [static] |
Solve a quadratic function with coefficients c, return roots s and number of roots.
Definition at line 66 of file intersect.cpp.
const FCL_REAL fcl::PolySolver::NEAR_ZERO_THRESHOLD = 1e-9 [static, private] |
Definition at line 66 of file intersect.h.