EMODnet Quantized Mesh Generator for Cesium
Public Types | Public Member Functions | List of all members
TinCreation::TinCreationGreedyInsertionStrategy Class Reference

Creates a TIN using the Greedy Insertion method. More...

#include <tin_creation_greedy_insertion_strategy.h>

Inheritance diagram for TinCreation::TinCreationGreedyInsertionStrategy:
TinCreation::TinCreationStrategy

Public Types

enum  ErrorType { ErrorHeight =0, Error3D }
 
typedef CGAL::Triangulation_vertex_base_2< Gt > Vb
 
typedef CGAL::Triangulation_face_base_with_info_2< GIFaceInfo, Gt > Fb
 
typedef CGAL::Triangulation_data_structure_2< Vb, Fb > Tds
 
typedef CGAL::Delaunay_triangulation_2< Gt, Tds > DT
 
typedef DT::Face_handle FaceHandle
 
typedef DT::Vertex_handle VertexHandle
 
typedef DT::Face_circulator FaceCirculator
 
typedef Gt::Rp::Triangle_3 Triangle_3
 
typedef Gt::Rp::Vector_3 Vector_3
 
typedef Gt::Rp::Segment_3 Segment_3
 
typedef Gt::Rp::Line_3 Line_3
 
typedef Gt::FT FT
 
typedef Gt::Rp::Intersect_3 Intersect_3
 

Public Member Functions

 TinCreationGreedyInsertionStrategy (double rootApproxTolerance, int initGridSamples=-1, int errorType=ErrorHeight)
 Types of errors to use. More...
 
 TinCreationGreedyInsertionStrategy (const std::vector< FT > &approxTolPerZoom, int initGridSamples=-1, int errorType=ErrorHeight)
 
void setParamsForZoom (const unsigned int &zoom)
 Adapts the parameters of the algorithm for the desired zoom level. More...
 
Polyhedron create (const std::vector< Point_3 > &dataPts, const bool &constrainEasternVertices, const bool &constrainWesternVertices, const bool &constrainNorthernVertices, const bool &constrainSouthernVertices)
 Create a TIN from a set of points. More...
 
- Public Member Functions inherited from TinCreation::TinCreationStrategy
 TinCreationStrategy ()
 Constructor.
 
void setScaleZ (const double &scale)
 
double getScaleZ ()
 Get the scale in Z.
 
void setBounds (const double &minX, const double &minY, const double &minZ, const double &maxX, const double &maxY, const double &maxZ)
 
double getMinX () const
 Get the minimum X coordinate.
 
double getMinY () const
 Get the minimum Y coordinate.
 
double getMinZ () const
 Get the minimum Z coordinate.
 
double getMaxX () const
 Get the maximum X coordinate.
 
double getMaxY () const
 Get the maximum Y coordinate.
 
double getMaxZ () const
 Get the maximum Z coordinate.
 
bool hasOriginalBoundingBox () const
 
std::vector< Point_3 > convertUVHToECEF (const std::vector< Point_3 > &pts) const
 Convert points to ECEF assuming that they are on a UVH format, and given the limits of the tile.
 
std::vector< Point_3 > convertECEFToUVH (const std::vector< Point_3 > &pts) const
 Convert points from local UVH to ECEF given the limits of the tile.
 
Point_3 convertUVHToECEF (const Point_3 &p) const
 Convert points to ECEF assuming that they are on a UVH format, and given the limits of the tile.
 
Point_3 convertECEFToUVH (const Point_3 &p) const
 Convert points from local UVH to ECEF given the limits of the tile.
 

Detailed Description

Creates a TIN using the Greedy Insertion method.

This class implements a slighly modified version of the method described in:

M. Garland, P. S. Heckbert, Fast polygonal approximation of terrains and height Fields, Technical report CMU-CS-95-181, Carnegie Mellon University 575 (September 1995).

Constructor & Destructor Documentation

◆ TinCreationGreedyInsertionStrategy() [1/2]

TinCreation::TinCreationGreedyInsertionStrategy::TinCreationGreedyInsertionStrategy ( double  rootApproxTolerance,
int  initGridSamples = -1,
int  errorType = ErrorHeight 
)
inline

Types of errors to use.

Constructor

Parameters
rootApproxToleranceApproximation tolerance (the error guiding the end of the process)
initGridSamplesSize of the fixed grid of samples to use. It effectively defines a minimum complexity on the mesh.
errorTypeType of error to use.

◆ TinCreationGreedyInsertionStrategy() [2/2]

TinCreation::TinCreationGreedyInsertionStrategy::TinCreationGreedyInsertionStrategy ( const std::vector< FT > &  approxTolPerZoom,
int  initGridSamples = -1,
int  errorType = ErrorHeight 
)
inline

Constructor

Parameters
rootApproxToleranceApproximation tolerances per zoom (the errors guiding the end of the process)
initGridSamplesSize of the fixed grid of samples to use. It effectively defines a minimum complexity on the mesh.
errorTypeType of error to use.

Member Function Documentation

◆ create()

Polyhedron TinCreation::TinCreationGreedyInsertionStrategy::create ( const std::vector< Point_3 > &  dataPts,
const bool &  constrainEasternVertices,
const bool &  constrainWesternVertices,
const bool &  constrainNorthernVertices,
const bool &  constrainSouthernVertices 
)
virtual

Create a TIN from a set of points.

While it does not impose any regularity on the input points, the use of constrain<X>Vertices is restricted to the shape of the convex hull of the input point being an axis-aligned rectangle.

Parameters
dataPtsInput 3D point set
constrainEasternVerticesFlag indicating whether the vertices on the eastern border of the tile should be preserved or not
constrainWesternVerticesFlag indicating whether the vertices on the western border of the tile should be preserved or not
constrainNorthernVerticesFlag indicating whether the vertices on the northern border of the tile should be preserved or not
constrainSouthernVerticesFlag indicating whether the vertices on the southern border of the tile should be preserved or not
Returns

Implements TinCreation::TinCreationStrategy.

◆ setParamsForZoom()

void TinCreation::TinCreationGreedyInsertionStrategy::setParamsForZoom ( const unsigned int &  zoom)
inlinevirtual

Adapts the parameters of the algorithm for the desired zoom level.

For further information, see the parameters' setting mechanism in the tutorial.

Parameters
zoomCurrent zoom level

Implements TinCreation::TinCreationStrategy.


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