| TerraLib 4.1

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions
TeTin Class Reference
Mathematical constants and macro definitions

A class to handle a TIN. More...

`#include <TeTin.h>`

List of all members.

## Public Types

typedef TeTinVertexSet::iterator | TeTinVertexIterator
typedef TeTinEdgeSet::iterator | TeTinEdgeIterator
typedef TeTinTriangleSet::iterator | TeTinTriangleIterator

## Public Member Functions

| TeTin ()
| TeTin (TeBox &)
void | clear ()
TeBox | box ()
bool | createInitialTriangles (TeBox &box)
bool | insertLineSamples (TeContourLine &line)
bool | loadFromFile (std::string &fileName)
bool | getLines (TeLineSet &lineSet)
bool | isEmpty ()
TeTinEdge & | edge (long i)
TeTinVertex & | vertex (long i)
TeTinTriangle & | triangle (long i)
TeTinVertexIterator | vertexBegin ()
TeTinVertexIterator | vertexEnd ()
TeTinEdgeIterator | edgeBegin ()
TeTinEdgeIterator | edgeEnd ()
TeTinTriangleIterator | triangleBegin ()
TeTinTriangleIterator | triangleEnd ()
bool | triangleContainsPoint (TeTinTriangle &t, TeCoord2D &pt)
bool | triangleContainsPoint (long t, TeCoord2D &pt)
long | edgeWithVertexDiffFromEdge (long t, long v, long e)
long | oneTriangleWithVertex (long vertex)
long | oneEdgeWithVertex (long vertex)
long | edgeOppVertex (TeTinTriangle &triangle, long vertex)
long | edgeOppVertex (long triangle, long vertex)
long | vertexOppEdge (long triangle, long edge)
bool | vertexEdges (long vertex, std::list< long > &edges)
bool | vertexOppEdges (long vertex, std::list< long > &edges)
bool | vertexOppEdges (long v, std::list< long > &triset, std::list< long > &edges)
bool | vertexOppVertices (long vertex, std::list< long > &vertices)
bool | vertexSecondNeighVertices (long v, list< long > &vertices)
bool | vertexTriangles (long vertex, std::list< long > &triangles)
bool | triangle3Neighbors (long t, long &neighbor0, long &neighbor1, long &neighbor2)
long | triangleAt (TeCoord2D &pt)
long | triangleAt (TeBox boxPt)
bool | triangleVertices (TeTinTriangle &t, long &vertex0, long &vertex1, long &vertex2)
bool | triangleVertices (long t, long &vertex0, long &vertex1, long &vertex2)
long | triangleVertexAt (long t, long vertex)
bool | triangle3DPoints (TeTinTriangle &t, TeCoord2D &pt0, TeCoord2D &pt1, TeCoord2D &pt2, double &val0, double &val1, double &val2)
bool | triangle3DPoints (long t, TeCoord2D &pt0, TeCoord2D &pt1, TeCoord2D &pt2, double &val0, double &val1, double &val2)
bool | trianglePoints (TeTinTriangle &t, TeCoord2D &pt0, TeCoord2D &pt1, TeCoord2D &pt2)
bool | trianglePoints (long t, TeCoord2D &pt0, TeCoord2D &pt1, TeCoord2D &pt2)
bool | twoNewTriangles (long t, long v, std::set< long > &triangles)
long | duplicateTriangle (long t, long n, long v, std::set< long > &triangles)
bool | dupNeighTriangle (long t, long e, long v, std::set< long > &triangles)
void | testDelaunayForVertex (long v, std::set< long > &triangles)
bool | testDelaunayAt (long t, long v, std::set< long > &triangles)
bool | testDelaunay (long e)
bool | testDelaunay (long t, long v)
bool | testDelaunay (long t1, long t2, long t3)
bool | testDelaunay (long t1, long t2, long t3, long t4)
bool | createDelaunay ()
bool | generateDelaunay (long nt, long ntbase, long &contr)
void | vertexExchange (long oldVertex, long newVertex)
long | oppositeVertex (long t, long e)
| Method used to read the identification number of the opposite vertex of a given edge.
bool | createSmallerAngleTriangulation ()
| Creates a triangulation using the Smaller Angle method.
bool | testSmallerAngleAt (long t, long v)
| Test the angle between two normals.
bool | createIsolinesTriangulation ()
| Test isolines.
bool | swapEdges (long t, long tv, long ai)
bool | insertPoint (TeSample &xyz)
bool | insertPoint (double x, double y, double value)
bool | edgesInterBySegment (TeCoord2D &pf, TeCoord2D &pn, std::list< long > &aiset, std::list< long > &viset)
bool | insertSegment (TeCoord2D &pf, TeCoord2D &pn)
void | convexize ()
bool | isEdgeTriangle (long t)
int | sizeTriangles ()
int | sizeVertex ()
TeGeomRep | elemType ()
bool | createTIN (TeSampleSet &sampleSet, TeContourLineSet &contourSet)
| Creates TIN.
bool | createTIN (TeLayer *inputLayer_ptr, TePolygonSet &ps)
| Creates TIN.
bool | createTIN (TeLayer *inputLayer_ptr)
| Creates TIN from point's layer.
bool | createAttrTable (TeTable &attTable, TeDatabase *db, TeLayer *layer)
| Creates a attributes table.
bool | createPolygon (TePolygonSet ps, TeTable &attTable, int t, TeCoord2D &pt0, TeCoord2D &pt1, TeCoord2D &pt2, double &val0, double &val1, double &val2)
| Creates polygons with points of triangles.
bool | createPolygon (TePolygonSet ps, TeTable &attTable, int t, TeCoord2D &pt0, TeCoord2D &pt1, TeCoord2D &pt2, double &val0, double &val1, double &val2, double &slope, double &aspect)
| Creates polygons with points of triangles.
bool | createPolygon (TePolygonSet ps, TeTable &attTable, int t, TeTinVertex vert0, TeTinVertex vert1, TeTinVertex vert2, double &slope, double &aspect)
bool | saveTIN (TeDatabase *db, TeLayer *layer, TePolygonSet &ps, TeTable &attTable)
| Add polygons in the layer and save attributes table in the database.
bool | saveVertexTIN (TeDatabase *db, TeLayer *layer, TePointSet &ps, TeTable &attTable)
| Add points in the layer and save attributes table in the database.
bool | saveTINdb (TeDatabase *db, string &outLayerName, string &tablename)
| Saves TIN in the database.
TeLayer * | saveTINdb (TeDatabase *db, TeProjection *proj, string &outLayerName, string &tablename)
| Saves TIN in the database.
bool | saveVertexTINdb (TeDatabase *db, string &outLayerName, string &tablename)
| Saves vertex of TIN in the database.
bool | borderUp ()
| Deletes vertex ONBOXVERTEX and re-triangular TIN.
void | writeTriangleEdgesSPRFile (std::string &name, TeRaster *raster)
| Saves TIN in SPRING file format.
void | areaTriangle (TeTinTriangle &t, float &area)
| Calculates the area of triangle.
void | slopeTriangle (TeTinTriangle &t, double &slope, char slopetype)
| Calculates the slope of triangle.
void | aspectTriangle (TeTinTriangle &t, double &aspect)
| Calculates the aspect of triangle.
bool | calculateGradient (TeRaster *&grid, char gradtype, char slopetype)
| Method that calculates gradient values for a TIN.
bool | createPointSet (TePointSet &ps, TeTable &atttable, TeLayer *layer, TeDatabase *db)
| Creates a PointSet object with vertex of TIN.
bool | createSampleSet (TeSampleSet &sample)
| Creates a sample object with vertex of TIN.
double | triangleGradient (TeTinTriangle &t, char gradtype, char slopetype)
| Calculates the gradient of triangle.
bool | normalTriangle (TeTinTriangle &t, std::vector< double > &nvector)
| Calculates the normal.
bool | normalTriangle (std::vector< TeTinVertex > vert, double *nvector)
void | normalizeVector (std::vector< double > &nvector)
| Function that normalize a vector by its size.
void | normalizeVector (double *nvector)
bool | defineInterLinesColumns (TeRaster *raster, TeTinTriangle t, int &fline, int &lline, int &fcol, int &lcol)
| Calculates the lines and the columns intercepted by a triangle (Used to image)
void | linearInterpolation (TeRaster *raster, int band, TeTinTriangle t, int fline, int lline, int fcol, int lcol)
| Fills the grid locations, inside a triangle, with a zvalue linearly evaluated (Used to image)
bool | linearInterpolation (TeRaster *&grid)
| Fills the grid locations, inside triangles, with a zvalue linearly evaluated (Used to grid)
bool | quinticInterpolation (TeRaster *&grid, int interpolator)
bool | interpolationPoint (TeCoord2D &pt, double &z)
| This function interpolates the average weighted by the inverse of the distance.
bool | slopeaspectPoint (TeCoord2D &pt, double &s, double &a)
| Calculates the slope and orientation on the point.
bool | vertexOncontour (long &v)
void | setTolerances (double minedgesize=0, double isoTol=-1, double ptsdist=-1, double breaklineTol=-1)
| Set triangulation tolerances.
double | pointToSegmentDistance (TeCoord2D fseg, TeCoord2D lseg, TeCoord2D pt, TeCoord2D &pti)
| Calculates the distance between a point and a segment.
bool | insertBreaklines (TeLineSet &breaklineSet, double scale)
| Insert breaklines in the triangulation.
void | copyBreaklines (TeLineSet &breaklines)
| Method that perform a copy of breaklines.
bool | insertBreaklinesPoints (TeLineSet breaklines, double scale)
| Insert break vertex in the triangulation.
bool | vertexClosestPoints (long v, std::vector< long > &clstVert)
| Method that search the closest points of a specific vertex.
bool | breakVertexClosestPoints (long v, std::vector< long > &rclstVert, std::vector< long > &lclstVert)
| Method that searches the break vertex closest points.
void | vertexDerivatives ()
| Calculate the first and second derivatives in the vertex of a given triangle.
void | triangleFirstDeriv ()
| Calculate first derivative on triangles.
void | vertexFirstDeriv ()
| Calculate first derivative on vertex.
void | triangleSecondDeriv ()
| Calculate second derivative on triangles.
void | vertexSecondDeriv ()
| Calculate second derivative on vertex.
void | breakVertexFirstDeriv ()
| Calculate the first derivative in the vertex of a given break triangle.
void | breakTriangleSecondDeriv ()
| Calculate the second derivative in the vertex of a given break triangle.
void | breakVertexSecondDeriv ()
| Calculates the second derivative at all triangulation break vertex.
void | calcVertexFirstDeriv (long v, std::vector< long > clstVertex, TeTinVertex &deriv)
| Calculates the first derivative in a given vertex.
void | calcVertexSecondDeriv (long v, std::vector< long > clstVertex, TeTinVertex &deriv)
| Calculates the second derivative in a given vertex.
void | calcTriangleSecondDeriv (long v, std::list< long > triangles, TeTinVertexSet &fderiv)
| Calculates the second derivatives in a vertex of a given triangle.
bool | findInterPoints (TeCoord2D &pf, TeCoord2D &pn, TeTinVertexSet &pts)
| Search the point that intersects two triangles containing points pf and pn.
void | vertexTriangles (long v, std::list< long > &rtri, std::list< long > &ltri)
| Finds the triangle list sharing a given node.
void | calcZvalueAkima (long t, TeTinVertex &v1, TeTinVertex &v2)
| Method that evaluate Z values for pt1 and pt2 using the Akima polynomium fitted in a triangle.
void | defineAkimaCoeficients (long t, double *coef)
void | defineAkimaCoeficients (long t, TeTinVertexSet vertSet, double *coef)
| Define the coefficients of the Akima polynomium fitted in a given triangle.
bool | checkTopology ()
| Method that check the topology in a triangulation.
void | checkEdges (long t)
| Method that check the edges in a triangulation.
void | orderEdges ()
| Order edges.
long | findEdge (long v1, long v2)
| Finds a edge given two vertex identification.
bool | onIsolineSegment (long e, TeTinVertex &vert)
| Method that checks if a vertex is on the isoline segment.
bool | onSegment (TeCoord2D pt, TeCoord2D fseg, TeCoord2D lseg, double tol)
| Method that checks if a point pt is on a segment.
bool | isIsolineSegment (long e)
| Method that veryfies if the Isoline is a segment.
bool | isBreaklineSegment (long e)
| Method that veryfies if the Breakline is a segment.
void | writeTriangleSPRFile (std::string nameVert, std::string nameEdge, std::string nameTriang)
bool | loadTIN (TeLayer *layer, TeDatabase *db)
| Load triangles from an input layer with TePOLYGONS representation.
void | point3dListFilter (TeTinVertexSet vertSet, double tol)
bool | leastSquareFitting (double *vectx, double *vecty, int np, int degree, double *coef)
| Method that performs a least square fitting in a set of points.
bool | gaussElimination (int nvars, int neqs, double **matrix)
| Method used to solve a system of linear equation throught the Gauss elimination method.
bool | isNeighborOnIsoOrBreakline (long t, long nviz)
| Method that veryfies if the neighbour is on an Isoline or on a Breakline.
void | generateContour (double contour, TeContourLine *&ptline)
| Method to generate contour from a TIN.
bool | defineInterTriangle (TeContourLine *&ptline, TeTinVertex *vert)
| Method used to define the intersections between an isoline and a triangle.
bool | defineInterEdge (TeContourLine *&ptline, TeTinVertex fpt, TeTinVertex spt)
| Method used to define the intersection with an edge of a triangle.
long | onSameSide (TeCoord2D pt1, TeCoord2D pt2, TeCoord2D fseg, TeCoord2D lseg)
string | errorMessage ()
| Returns the error message.

## Detailed Description

A class to handle a TIN.

## Constructor & Destructor Documentation

TeTin::TeTin | ( |  | ) | `[inline]`

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

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeTin.h
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeTin.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines