MDAL
Public Member Functions | List of all members
MDAL::Mesh2dm Class Reference
Inheritance diagram for MDAL::Mesh2dm:
MDAL::MemoryMesh MDAL::Mesh

Public Member Functions

 Mesh2dm (size_t faceVerticesMaximumCount, const std::string &uri, const std::map< size_t, size_t > vertexIDtoIndex)
 
virtual size_t vertexIndex (size_t vertexID) const
 HYDRO_AS-2D supports gaps in the vertex indexing, but we use continuos array of vertices in MDAL. More...
 
virtual size_t maximumVertexId () const
 Returns maximum vertex ID. More...
 
- Public Member Functions inherited from MDAL::MemoryMesh
 MemoryMesh (const std::string &driverName, size_t faceVerticesMaximumCount, const std::string &uri)
 Constructs an empty mesh.
 
std::unique_ptr< MDAL::MeshVertexIteratorreadVertices () override
 
std::unique_ptr< MDAL::MeshEdgeIteratorreadEdges () override
 
std::unique_ptr< MDAL::MeshFaceIteratorreadFaces () override
 
const Vertices & vertices () const
 
const Faces & faces () const
 
const Edges & edges () const
 
void setVertices (Vertices vertices)
 Sets all vertices using std::move if possible.
 
void setFaces (Faces faces)
 Sets all faces using std::move if possible.
 
void setEdges (Edges edges)
 Sets all edges using std::move if possible.
 
size_t verticesCount () const override
 
size_t edgesCount () const override
 
size_t facesCount () const override
 
BBox extent () const override
 
void addVertices (size_t vertexCount, double *coordinates) override
 
void addFaces (size_t faceCount, size_t driverMaxVerticesPerFace, int *faceSizes, int *vertexIndices) override
 
void addEdges (size_t edgeCount, int *startVertexIndices, int *endVertexIndices) override
 
bool isEditable () const override
 
- Public Member Functions inherited from MDAL::Mesh
 Mesh (const std::string &driverName, size_t faceVerticesMaximumCount, const std::string &uri)
 
std::string driverName () const
 
void setSourceCrs (const std::string &str)
 
void setSourceCrsFromWKT (const std::string &wkt)
 
void setSourceCrsFromEPSG (int code)
 
void setSourceCrsFromPrjFile (const std::string &filename)
 
std::shared_ptr< DatasetGroupgroup (const std::string &name)
 Find a dataset group by name.
 
std::string uri () const
 
std::string crs () const
 
size_t faceVerticesMaximumCount () const
 
std::string getMetadata (const std::string &key)
 
void setMetadata (const std::string &key, const std::string &val)
 
void setMetadata (const Metadata &new_metadata)
 
virtual void closeSource ()
 

Additional Inherited Members

- Public Attributes inherited from MDAL::Mesh
DatasetGroups datasetGroups
 
Metadata metadata
 
- Protected Member Functions inherited from MDAL::Mesh
void setFaceVerticesMaximumCount (const size_t &faceVerticesMaximumCount)
 

Member Function Documentation

◆ maximumVertexId()

size_t MDAL::Mesh2dm::maximumVertexId ( ) const
virtual

Returns maximum vertex ID.

For meshes without gaps in vertex indexing, it is vertex count - 1

◆ vertexIndex()

size_t MDAL::Mesh2dm::vertexIndex ( size_t  vertexID) const
virtual

HYDRO_AS-2D supports gaps in the vertex indexing, but we use continuos array of vertices in MDAL.

Parameters
vertexIDinternal index/ID of the vertex that native format uses
Returns
index of the vertex in the continuous array of vertices we returned by readVertices(). For invalid vertexID it is returned index that is out of vertices array bounds.

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