IntelliPhoto  0.5
IntelliHelper Namespace Reference

Functions

float sign (QPoint &p1, QPoint &p2, QPoint &p3)
 A function to get the 2*area of a traingle, using its determinat. More...
 
bool isInTriangle (Triangle &tri, QPoint &P)
 A function to check if a given point is in a triangle. More...
 
std::vector< TrianglecalculateTriangles (std::vector< QPoint > polyPoints)
 A function to split a polygon in its spanning traingles by using Meisters Theorem of graph theory by clipping ears of a planar graph. More...
 
bool isInPolygon (std::vector< Triangle > &triangles, QPoint &point)
 A function to check if a point lies in a polygon by checking its spanning triangles. More...
 

Function Documentation

◆ calculateTriangles()

std::vector< Triangle > IntelliHelper::calculateTriangles ( std::vector< QPoint >  polyPoints)

A function to split a polygon in its spanning traingles by using Meisters Theorem of graph theory by clipping ears of a planar graph.

Parameters
polyPoints- The Vertices of the polygon.
Returns
Returns a Container of disjoint Triangles, which desribe the polygon area.

Definition at line 7 of file IntelliHelper.cpp.

Here is the caller graph for this function:

◆ isInPolygon()

bool IntelliHelper::isInPolygon ( std::vector< Triangle > &  triangles,
QPoint &  point 
)

A function to check if a point lies in a polygon by checking its spanning triangles.

Parameters
triangles- The spanning triangles of the planar polygon.
point- The point to checl, if it lies in the polygon.
Returns
Returns true if the point lies in the üpolygon, otherwise false.

Definition at line 116 of file IntelliHelper.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isInTriangle()

bool IntelliHelper::isInTriangle ( Triangle tri,
QPoint &  P 
)
inline

A function to check if a given point is in a triangle.

Parameters
tri- The triangle to check, if it contains the point.
P- The point to check if it is in the triangle.
Returns
Returns true if the point is in the triangle, false otheriwse

Definition at line 33 of file IntelliHelper.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sign()

float IntelliHelper::sign ( QPoint &  p1,
QPoint &  p2,
QPoint &  p3 
)
inline

A function to get the 2*area of a traingle, using its determinat.

Parameters
p1- The Point to check its side.
p2- The first Point of the spanning Line
p3- The second Point of the spanning line.
Returns
Returns the area of the traingle*2

Definition at line 23 of file IntelliHelper.h.

Here is the caller graph for this function: