A class to deine a triangle mesh with some attributes.
More...
#include <mia/mesh/triangularMesh.hh>
A class to deine a triangle mesh with some attributes.
This class defines the representation of a triangle-mesh.
Definition at line 61 of file triangularMesh.hh.
◆ Pointer
◆ type
◆ EData
these are some flags to indicate, which data is actually available
Enumerator |
---|
ed_none | |
ed_vertex | |
ed_normal | |
ed_color | |
ed_scale | |
Definition at line 74 of file triangularMesh.hh.
◆ CTriangleMesh() [1/5]
CTriangleMesh::CTriangleMesh |
( |
| ) |
|
Standart constructor creates an empty mesh.
◆ CTriangleMesh() [2/5]
copy constructor makes a shallow copy of the mesh, i.e. the storage for triangles, vertices, normals, textur-coordinates, colors and the deformation-scale is shared between original and copy
- Parameters
-
orig | the mesh to be copied |
◆ CTriangleMesh() [3/5]
CTriangleMesh::CTriangleMesh |
( |
int |
n_triangles, |
|
|
int |
n_vertices |
|
) |
| |
contruct an mesh with uninitialized data
- Parameters
-
n_triangles | number of triangles |
n_vertices | number of vertices |
◆ CTriangleMesh() [4/5]
CTriangleMesh::CTriangleMesh |
( |
PTrianglefield |
triangles, |
|
|
PVertexfield |
vertices, |
|
|
PNormalfield |
normals, |
|
|
PColorfield |
colors, |
|
|
PScalefield |
scales |
|
) |
| |
creates a new mesh from given input data
- Parameters
-
triangles | the triangle data (required) |
vertices | the vertex data (required) |
normals | per vertex normals - can be NULL, in this case then the normals are calculated |
colors | per vertex color |
scales | |
◆ CTriangleMesh() [5/5]
CTriangleMesh::CTriangleMesh |
( |
PTrianglefield |
triangles, |
|
|
PVertexfield |
vertices |
|
) |
| |
creates a new mesh from given input data
- Parameters
-
triangles | the triangle data (required) |
vertices | the vertex data (required) |
◆ ~CTriangleMesh()
CTriangleMesh::~CTriangleMesh |
( |
| ) |
|
Destructor - it releases all the data.
◆ clone()
- Returns
- a copy of this mesh
◆ clone_connectivity()
- Returns
- a mesh where the connectivity is copied, the vertices are allocated, but not set, and without normals and scale values
◆ color_at()
const color_type& CTriangleMesh::color_at |
( |
unsigned int |
i | ) |
const |
- Returns
- the color at the given index i
- Parameters
-
◆ evaluate_normals()
void CTriangleMesh::evaluate_normals |
( |
| ) |
|
Force the re-evaluation of the normals of the mesh. The normal at a vertex is evaluared as the area-weighted average of the normals of the triangles, the vertex is part of.
Referenced by colorize_mesh().
◆ get_available_data()
int CTriangleMesh::get_available_data |
( |
| ) |
const |
- Returns
- a set of EData flags indicating which data is available
Referenced by colorize_mesh().
◆ get_color_pointer()
const void* CTriangleMesh::get_color_pointer |
( |
| ) |
const |
- Returns
- a raw pointer to the colors
◆ get_normal_pointer()
const void* CTriangleMesh::get_normal_pointer |
( |
| ) |
const |
- Returns
- a raw pointer to the normals
◆ get_sourceformat()
const std::string& CTriangleMesh::get_sourceformat |
( |
| ) |
const |
|
inline |
- Returns
- the format the mesh was given in the beginning
Definition at line 261 of file triangularMesh.hh.
◆ get_triangle_pointer()
const void* CTriangleMesh::get_triangle_pointer |
( |
| ) |
const |
- Returns
- a raw pointer to the triangles
◆ get_triangles()
const CTrianglefield& CTriangleMesh::get_triangles |
( |
| ) |
const |
◆ get_type_description()
static const std::string CTriangleMesh::get_type_description |
( |
| ) |
|
|
static |
- Returns
- a type sescription name usefull for some plugin handling
◆ get_vertex_pointer()
const void* CTriangleMesh::get_vertex_pointer |
( |
| ) |
const |
- Returns
- a raw pointer to the vertices
◆ get_vertices()
const CVertexfield& CTriangleMesh::get_vertices |
( |
| ) |
const |
◆ normal_at()
const normal_type& CTriangleMesh::normal_at |
( |
unsigned int |
i | ) |
const |
- Returns
- a const reference to the normal of the i-th vertex
◆ scale_at()
const scale_type& CTriangleMesh::scale_at |
( |
unsigned int |
i | ) |
const |
- Returns
- a const reference to the scale at the i-th vertex
◆ set_sourceformat()
void CTriangleMesh::set_sourceformat |
( |
const std::string & |
fmt | ) |
|
|
inline |
◆ triangle_at()
const triangle_type& CTriangleMesh::triangle_at |
( |
unsigned int |
i | ) |
const |
- Returns
- a cost reference to the triangle at index i
◆ triangle_size()
unsigned int CTriangleMesh::triangle_size |
( |
| ) |
const |
- Returns
- the number of triangles, the mesh consists of
◆ vertex_at()
const vertex_type& CTriangleMesh::vertex_at |
( |
unsigned int |
i | ) |
const |
- Returns
- a const reference to the i-th vertex
◆ vertices_size()
unsigned int CTriangleMesh::vertices_size |
( |
| ) |
const |
- Returns
- the number of vertices the mesh consists of
◆ data_descr
const char* CTriangleMesh::data_descr |
|
static |
The type description provides information about the data type that is used by the plug-in system
Definition at line 66 of file triangularMesh.hh.
The documentation for this class was generated from the following file: