aimstil
5.0.5
|
Classes | |
struct | AreIntersecting |
A namespace structure collecting geometrical object intersection algorithms. More... | |
struct | IsIncludedIn |
A namespace structure collecting geometrical object inclusion algorithms. More... | |
struct | Project |
A namespace structure collecting geometrical projection algorithms. More... | |
class | Triangle2Segment |
Approximate an ill-conditionned triangle by a segment. More... | |
class | TriangleNormal |
Compute the normal of a triangle. More... | |
Functions | |
template<typename T > | |
T | herons_formula (T a, T b, T c) |
Heron's formula. More... | |
template<typename T > | |
T | herons_formula (numeric_array< T, 3 > const &lengths) |
Heron's formula. More... | |
template<typename T > | |
T | law_of_cosines (T a, T b, T c) |
Returns the cosine of angle A given the lengths of the triangle edges. More... | |
template<typename T > | |
T | law_of_tangents (T a, T b, T c, T area) |
Returns the tangent of angle A given the area and the lengths of the edges of the triangle. More... | |
template<typename T > | |
T | law_of_tangents (T a, T b, T c) |
Returns the tangent of angle A given the lengths of the edges of the triangle. More... | |
template<typename T > | |
T | angle (T x, T y, T norm) |
Returns the angle between (x,y) and the x-axis, with the norm of (x,y) provided. More... | |
template<typename T > | |
T | angle (T x, T y) |
Returns the angle between (x,y) and the x-axis. More... | |
template<typename T > | |
void | cartesian2spherical (T x, T y, T z, T &theta, T &phi, T &rho) |
Converts cartesian coordinates into spherical coordinates. More... | |
template<typename T > | |
void | spherical2cartesian (T theta, T phi, T rho, T &x, T &y, T &z) |
Converts spherical coordinates into cartesian coordinates. More... | |
template<typename TArray > | |
bool | triangle2segment (const TArray &A, const TArray &B, const TArray &C, TArray &X, TArray &Y) |
template<typename TArray , typename TResArray > | |
bool | triangle_normal (const TArray &A, const TArray &B, const TArray &C, TResArray &result) |
Compute the normal of a triangle. More... | |
template<typename TPrec , typename TPoint > | |
bool | is_in_circumcircle (const TPoint &p, const TPoint &a, const TPoint &b, const TPoint &c) |
Check whether a point lies within the circumcircle of a given triangle. More... | |
|
inline |
Returns the angle between (x,y) and the x-axis, with the norm of (x,y) provided.
NB: this version is clearly intended for fast computation and thus no checking on norm is done: in particular, you have to check yourself that the norm is not too small.
Referenced by til::myComplexPow(), til::MeshWaveletEnergy< TVertexCollection, TNeighborhoods, TPrec >::operator()(), and til::simple_delaunay_triangulation().
|
inline |
Returns the angle between (x,y) and the x-axis.
void til::geo::cartesian2spherical | ( | T | x, |
T | y, | ||
T | z, | ||
T & | theta, | ||
T & | phi, | ||
T & | rho | ||
) |
Converts cartesian coordinates into spherical coordinates.
|
inline |
Heron's formula.
The Heron's formula yields the surface of a triangle given the length of its edges.
|
inline |
Heron's formula.
The Heron's formula yields the surface of a triangle given the length of its edges.
|
inline |
Check whether a point lies within the circumcircle of a given triangle.
p | a point |
a | first triangle vertex |
b | second triangle vertex |
c | third triangle vertex |
Definition at line 750 of file geometrics.h.
Referenced by til::geo::AreIntersecting::Triangles3D< TArray >::operator()().
|
inline |
Returns the cosine of angle A given the lengths of the triangle edges.
|
inline |
Returns the tangent of angle A given the area and the lengths of the edges of the triangle.
|
inline |
Returns the tangent of angle A given the lengths of the edges of the triangle.
|
inline |
Converts spherical coordinates into cartesian coordinates.
bool til::geo::triangle2segment | ( | const TArray & | A, |
const TArray & | B, | ||
const TArray & | C, | ||
TArray & | X, | ||
TArray & | Y | ||
) |
Definition at line 130 of file geometrics.h.
Referenced by til::geo::Project::PointOnTriangle3D< TArray, TOutputArray >::operator()().
bool til::geo::triangle_normal | ( | const TArray & | A, |
const TArray & | B, | ||
const TArray & | C, | ||
TResArray & | result | ||
) |
Compute the normal of a triangle.
Referenced by til::closest_normal(), til::geo::Project::PointOnTriangle3D< TArray, TOutputArray >::operator()(), and til::geo::AreIntersecting::Triangles3D< TArray >::operator()().