Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
BIAS::Triangle Class Reference

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...
 

Detailed Description

Represents a 2D triangle and allows some computations with it.

Author
rwulff 04/2010

Definition at line 14 of file Triangle.hh.

Constructor & Destructor Documentation

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().

Member Function Documentation

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.

Parameters
pthe point
lambdaAthe barycentric coordinate for the first corner of this triangle
lambdaBthe barycentric coordinate for the second corner of this triangle
lambdaCthe barycentric coordinate for the thrid corner of this triangle

Definition at line 11 of file Triangle.cpp.

void BIAS::Triangle::GetCorners ( HomgPoint2D a,
HomgPoint2D b,
HomgPoint2D c 
)
inline

Returns the corners of this triangle.

Definition at line 73 of file Triangle.hh.

bool BIAS::Triangle::IsPointInTriangle ( const HomgPoint2D p)
inline

Checks if the given point is inside this triangle.

Parameters
pthe point to check
Returns
true iff the given point is inside this triangle

Definition at line 32 of file Triangle.hh.

void BIAS::Triangle::SetCorners ( const HomgPoint2D a,
const HomgPoint2D b,
const HomgPoint2D c 
)
inline

Sets the corners of this triangle.

Definition at line 61 of file Triangle.hh.


The documentation for this class was generated from the following files: