maliput
|
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 GeoVertex & | get_vertex (int vi) const |
const GeoNormal & | get_normal (int ni) const |
GeoMesh | ( | ) |
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
.
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().
const std::vector<IndexFace>& faces | ( | ) | const |
const GeoNormal& get_normal | ( | int | ni | ) | const |
const GeoVertex& get_vertex | ( | int | vi | ) | const |
const std::vector<const GeoNormal*>& normals | ( | ) | const |
int num_normals | ( | ) | const |
int num_vertices | ( | ) | const |
void PushFace | ( | const GeoFace & | inertial_face | ) |
const std::vector<const GeoVertex*>& vertices | ( | ) | const |