Basic Image AlgorithmS Library
2.8.0
|
Represents a 2D triangle and allows some computations with it. More...
#include <Base/Geometry/Triangle.hh>
Public Member Functions | |
void | GetBarycentricCoords (const HomgPoint2D &p, double &lambdaA, double &lambdaB, double &lambdaC) |
Returns the barycentric coordinates of the given point with respect to this triangle. More... | |
void | GetCorners (HomgPoint2D &a, HomgPoint2D &b, HomgPoint2D &c) |
Returns the corners of this triangle. More... | |
bool | IsPointInTriangle (const HomgPoint2D &p) |
Checks if the given point is inside this triangle. More... | |
void | SetCorners (const HomgPoint2D &a, const HomgPoint2D &b, const HomgPoint2D &c) |
Sets the corners of this triangle. More... | |
Triangle (const HomgPoint2D &a, const HomgPoint2D &b, const HomgPoint2D &c) | |
Constructor. More... | |
Represents a 2D triangle and allows some computations with it.
Definition at line 14 of file Triangle.hh.
BIAS::Triangle::Triangle | ( | const HomgPoint2D & | a, |
const HomgPoint2D & | b, | ||
const HomgPoint2D & | c | ||
) |
Constructor.
Definition at line 3 of file Triangle.cpp.
References Triangle().
Referenced by Triangle().
void BIAS::Triangle::GetBarycentricCoords | ( | const HomgPoint2D & | p, |
double & | lambdaA, | ||
double & | lambdaB, | ||
double & | lambdaC | ||
) |
Returns the barycentric coordinates of the given point with respect to this triangle.
p | the point |
lambdaA | the barycentric coordinate for the first corner of this triangle |
lambdaB | the barycentric coordinate for the second corner of this triangle |
lambdaC | the barycentric coordinate for the thrid corner of this triangle |
Definition at line 11 of file Triangle.cpp.
|
inline |
Returns the corners of this triangle.
Definition at line 73 of file Triangle.hh.
|
inline |
Checks if the given point is inside this triangle.
p | the point to check |
Definition at line 32 of file Triangle.hh.
|
inline |
Sets the corners of this triangle.
Definition at line 61 of file Triangle.hh.