GeoMesh Class Reference

Detailed Description

An Inertial-frame mesh: a collection of GeoFaces.

#include <include/maliput/utility/mesh.h>

Public Member Functions

 GeoMesh ()
void PushFace (const GeoFace &inertial_face)
void AddFacesFrom (const GeoMesh &other_mesh)
std::tuple< int, int > EmitObj (std::ostream &os, const std::string &material, int precision, const api::InertialPosition &origin, int vertex_index_offset, int normal_index_offset) const
 Emits the mesh as Wavefront OBJ elements to os. More...
const std::vector< const GeoVertex * > & vertices () const
const std::vector< const GeoNormal * > & normals () const
const std::vector< IndexFace > & faces () const
int num_vertices () const
int num_normals () const
const GeoVertexget_vertex (int vi) const
const GeoNormalget_normal (int ni) const

Constructor & Destructor Documentation

◆ GeoMesh()

GeoMesh ( )

Member Function Documentation

◆ AddFacesFrom()

void AddFacesFrom ( const GeoMesh other_mesh)

◆ EmitObj()

std::tuple<int, int> EmitObj ( std::ostream &  os,
const std::string &  material,
int  precision,
const api::InertialPosition origin,
int  vertex_index_offset,
int  normal_index_offset 
) const

Emits the mesh as Wavefront OBJ elements to os.

material is the name of an MTL-defined material to describe visual properties of the mesh. precision specifies the fixed-point precision (number of digits after the decimal point) for vertex and normal coordinate values. origin specifies a Inertial-frame origin for vertex coordinates (i.e., the emitted values for a vertex at (x,y,z) will be (x,y,z) - origin).

If other meshes have already been emitted to stream os, then vertex_index_offset and normal_index_offset must correspond to the number of previously emitted vertices and normals respectively. Conveniently, EmitObj() returns a tuple of (vertex_index_offset, normal_index_offset) which can be chained into a succeeding call to EmitObj().

◆ faces()

const std::vector<IndexFace>& faces ( ) const

◆ get_normal()

const GeoNormal& get_normal ( int  ni) const

◆ get_vertex()

const GeoVertex& get_vertex ( int  vi) const

◆ normals()

const std::vector<const GeoNormal*>& normals ( ) const

◆ num_normals()

int num_normals ( ) const

◆ num_vertices()

int num_vertices ( ) const

◆ PushFace()

void PushFace ( const GeoFace inertial_face)

◆ vertices()

const std::vector<const GeoVertex*>& vertices ( ) const

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