IntelliPhoto 0.6

Functions
IntelliTriangulation 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< Triangle > | 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. More...
bool | isInPolygon (const 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 > IntelliTriangulation::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 IntelliTriangulation.cpp.

## ◆ isInPolygon()

bool IntelliTriangulation::isInPolygon | ( | const 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 IntelliTriangulation.cpp.

## ◆ isInTriangle()

bool IntelliTriangulation::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 36 of file IntelliTriangulation.h.

## ◆ sign()

float IntelliTriangulation::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 26 of file IntelliTriangulation.h.