| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

Functions
Functions to compute the centroid
Geometry algorithms

## Functions

TL_DLL TeCoord2D | TeFindCentroid (TeMultiGeometry &mGeom)
| Calculates the centroid of a multi geometry.
TL_DLL TeCoord2D | TeFindCentroid (const TePolygon &p)
| Calculates the centroid of a polygon.
TL_DLL TeCoord2D | TeFindCentroid (const TeLine2D &l)
| Calculates a reference point.
TL_DLL TeCoord2D | TeFindCentroid (const TeCell &c)
| Calculates the centroid of a cell.
TL_DLL TeCoord2D | TeFindCentroid (const TePoint &p)
| Calculates the centroid of a point.
TL_DLL TeCoord2D | TeFindCentroid (const TeText &t)
| Calculates the centroid of a text.
TL_DLL TeCoord2D | TeFindCentroid (const TePolygonSet &s)
| Calculates the centroid of a polygon set.
TL_DLL TeCoord2D | TeFindCentroid (const TeLineSet &s)
TL_DLL TeCoord2D | TeFindCentroid (const TeCellSet &s)
| Calculates the centroid of a cell set.
TL_DLL TeCoord2D | TeFindCentroid (TePointSet &ps)
| Calculates the centroid of a point set.
TL_DLL TeCoord2D | TeFindCentroid (TeTextSet &ts)
| Calculates the centroid of a text set.
TL_DLL bool | TeFindTriangleCenter (const TeCoord2D &vert0, const TeCoord2D &vert1, const TeCoord2D &vert2, TeCoord2D &pc)
| Calculates the center of a triangle.
TL_DLL bool | TeSegmentsIntersectPoint (const TeCoord2D &fr0, const TeCoord2D &to0, const TeCoord2D &fr1, const TeCoord2D &t1, TeCoord2D &pi)
| Calculates intersection between two segments.

## Detailed Description

Functions that return the centroid.

## Function Documentation

TL_DLL TeCoord2D TeFindCentroid | ( | TeMultiGeometry & | mGeom | ) |

Calculates the centroid of a multi geometry.

Parameters:

  p | A multi geometry whose centroid we want to known.

TL_DLL TeCoord2D TeFindCentroid | ( | const TePolygon & | p | ) |

Calculates the centroid of a polygon.

Parameters:

  p | A TePolygon whose centroid we want to known.

TL_DLL TeCoord2D TeFindCentroid | ( | const TeCell & | c | ) |

Calculates the centroid of a cell.

Parameters:

  c | A TeCell whose centroid we want to known.

TL_DLL TeCoord2D TeFindCentroid | ( | TeTextSet & | ts | ) |

Calculates the centroid of a text set.

Parameters:

  ts | A TeTextSet set whose centroid we want to known.

TL_DLL TeCoord2D TeFindCentroid | ( | TePointSet & | ps | ) |

Calculates the centroid of a point set.

Parameters:

  ps | A TePointSet set whose centroid we want to known.

TL_DLL TeCoord2D TeFindCentroid | ( | const TeLineSet & | s | ) |

Calculates the centroid of a line set.

Parameters:

  s | A TeLine set whose centroid we want to known.

TL_DLL TeCoord2D TeFindCentroid | ( | const TeCellSet & | s | ) |

Calculates the centroid of a cell set.

Parameters:

  s | A TeCell set whose centroid we want to known.

TL_DLL TeCoord2D TeFindCentroid | ( | const TePolygonSet & | s | ) |

Calculates the centroid of a polygon set.

Parameters:

  s | A TePolygon set whose centroid we want to known.

TL_DLL TeCoord2D TeFindCentroid | ( | const TeText & | t | ) |

Calculates the centroid of a text.

Parameters:

  t | A TeText whose centroid we want to known.

TL_DLL TeCoord2D TeFindCentroid | ( | const TePoint & | p | ) |

Calculates the centroid of a point.

Parameters:

  p | A TePoint whose centroid we want to known.

TL_DLL TeCoord2D TeFindCentroid | ( | const TeLine2D & | l | ) |

Calculates a reference point.

Parameters:

  l | A TeLine whose centroid we want to known.

TL_DLL bool TeFindTriangleCenter | ( | const TeCoord2D & | vert0,
|  | const TeCoord2D & | vert1,
|  | const TeCoord2D & | vert2,
|  | TeCoord2D & | pc
| ) |  |

Calculates the center of a triangle.

Parameters:

  vert0 | First triagle's vertex.
  vert1 | Second triagle's vertex.
  vert2 | Third triagle's vertex.
  pc | The triangle center.

TL_DLL bool TeSegmentsIntersectPoint | ( | const TeCoord2D & | fr0,
|  | const TeCoord2D & | to0,
|  | const TeCoord2D & | fr1,
|  | const TeCoord2D & | t1,
|  | TeCoord2D & | pi
| ) |  |

Calculates intersection between two segments.

Parameters:

  fr0 | First point of first segment.
  to0 | Second point of first segment.
  fr1 | First point of second segment.
  to1 | Second point of second segment.
  pi | The intersection point coordinates.

Returns:
  true is intersects, false otherwise.

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines