EMODnet Quantized Mesh Generator for Cesium
Public Types | Public Member Functions | Friends | List of all members
QuantizedMeshTile Class Reference

Encapsulates a Tile in Quantized Mesh format *. More...

#include <quantized_mesh_tile.h>

Inheritance diagram for QuantizedMeshTile:
QuantizedMesh

Public Types

typedef TinCreation::Point_3 Point_3
 
typedef TinCreation::Vector_3 Vector_3
 
- Public Types inherited from QuantizedMesh
enum  ExtensionIds { OCT_VERTEX_NORMALS = 1, WATER_MASK = 2 }
 

Public Member Functions

 QuantizedMeshTile (const ctb::TileCoordinate &coord, const Ellipsoid &e=WGS84Ellipsoid())
 Creates a quantized mesh tile from a tile coordinate. More...
 
 QuantizedMeshTile (const char *fileName, const ctb::TileCoordinate &coord, const Ellipsoid &e=WGS84Ellipsoid())
 Create a quantized mesh tile from a file. More...
 
 QuantizedMeshTile (const QuantizedMesh &qm, const ctb::TileCoordinate &coord, const Ellipsoid &e=WGS84Ellipsoid())
 Creates a quantized mesh tile from quantized mesh data. More...
 
void convertUVHToLonLatHeight (const unsigned short &u, const unsigned short &v, const unsigned short &h, double &lon, double &lat, double &height) const
 Convert U/V/Height coordinates in quantized mesh tile to Lon/Lat/Height.
 
bool exportToOFF (const std::string &outFilePath, const bool &useRealWorldValues=false)
 Exports the geometry of the tile to OFF format. More...
 
Point_3 horizonOcclusionPoint (const std::vector< Point_3 > &pts, const Point_3 &center)
 Compute the horizon occlusion point for the given tile. More...
 
- Public Member Functions inherited from QuantizedMesh
 QuantizedMesh ()
 Constructor.
 
 QuantizedMesh (const std::string &filePath)
 Constructor from file.
 
bool readFile (const std::string &filePath)
 Read the tile from a file.
 
bool writeFile (const std::string &filePath)
 Write the tile to a file.
 
void print ()
 Show the contents of the tile on screen.
 
void printHeader ()
 Show the contents of the header of the tile on screen.
 
void setHeader (const Header &header)
 Set the header part of the quantized mesh structure.
 
void setVertexData (const VertexData &vd)
 Set the vertex data part of the quantized mesh structure.
 
void setIndexData (const IndexData &id)
 Set the index data part of the quantized mesh structure.
 
void setEdgeIndices (const EdgeIndices &ei)
 Set the edge indices data part of the quantized mesh structure.
 
void setVertexNormals (const VertexNormals &vn)
 Set the vertices normal part of the quantized mesh structure.
 
Header getHeader () const
 Get the header part of the quantized mesh structure.
 
VertexData getVertexData () const
 Get the vertex data part of the quantized mesh structure.
 
IndexData getIndexData () const
 Get the index data of the quantized mesh structure.
 
VertexNormals getVertexNormals () const
 Get the vertex normals of the quantized mesh structure.
 
EdgeIndices getEdgeIndices () const
 Get the edge indices of the quantized mesh structure.
 

Friends

class TerrainTiler
 
class QuantizedMeshTiler
 

Additional Inherited Members

- Static Public Member Functions inherited from QuantizedMesh
static unsigned short remapToVertexDataValue (const double &value, const double &minOr, const double &maxOr)
 Remap a value to be between 0 and 32767. More...
 
static double remapFromVertexDataValue (const double &value, const double &minOr, const double &maxOr)
 
- Public Attributes inherited from QuantizedMesh
const unsigned short int TILE_SIZE = 65
 
- Static Public Attributes inherited from QuantizedMesh
static const unsigned short MAX_VERTEX_DATA = 32767
 

Detailed Description

Encapsulates a Tile in Quantized Mesh format *.

Constructor & Destructor Documentation

◆ QuantizedMeshTile() [1/3]

QuantizedMeshTile::QuantizedMeshTile ( const ctb::TileCoordinate &  coord,
const Ellipsoid e = WGS84Ellipsoid() 
)
inline

Creates a quantized mesh tile from a tile coordinate.

Parameters
coordCoordinates of the tile
eThe reference Ellipsoid to use

◆ QuantizedMeshTile() [2/3]

QuantizedMeshTile::QuantizedMeshTile ( const char *  fileName,
const ctb::TileCoordinate &  coord,
const Ellipsoid e = WGS84Ellipsoid() 
)
inline

Create a quantized mesh tile from a file.

Parameters
fileNameThe quantized-mesh tile file
coordCoordinates of the tile
eThe reference Ellipsoid to use

◆ QuantizedMeshTile() [3/3]

QuantizedMeshTile::QuantizedMeshTile ( const QuantizedMesh qm,
const ctb::TileCoordinate &  coord,
const Ellipsoid e = WGS84Ellipsoid() 
)
inline

Creates a quantized mesh tile from quantized mesh data.

Parameters
qmQuantizedMesh data
coordCoordinates of the tile
eThe reference Ellipsoid to use

Member Function Documentation

◆ exportToOFF()

bool QuantizedMeshTile::exportToOFF ( const std::string &  outFilePath,
const bool &  useRealWorldValues = false 
)

Exports the geometry of the tile to OFF format.

Parameters
outFilePathOutput file path
useRealWorldValuesFlag indicating whether the vertices of the output geometry are the real values (i.e., the lat/lon/height coordinates) or the quantized values.
Returns
True if file created successfully.

◆ horizonOcclusionPoint()

TinCreation::Point_3 QuantizedMeshTile::horizonOcclusionPoint ( const std::vector< Point_3 > &  pts,
const Point_3 &  center 
)

Compute the horizon occlusion point for the given tile.

Parameters
ptsVertices of the tile (in ECEF coordinates!)
centerCentroid of the tile
Returns
Horizon occlusion point

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