Improved doxygen documentation as #7
This commit is contained in:
parent
5735102cb7
commit
1d101609f6
|
@ -1,9 +1,9 @@
|
|||
/** \page attributes
|
||||
User-defined attributes
|
||||
User-Defined Attributes
|
||||
=======================
|
||||
VCG Lib also provides a simple mechanism to associate user-defined typed 'attributes' to the simplicies and to the mesh.
|
||||
|
||||
Note that both 'attributes' and 'components' are basically accessory data that are bound to a simplex.
|
||||
Note that both 'attributes' and 'components' are basically accessory data that are bound to a simplex. In short, components are statically defined member data, while attributes are run-time defined, handle accessed, data.
|
||||
|
||||
Conceptually the difference is that with the term component VCGLib indicates those basic values that are considered to 'define' the simplex (its position, its normal, its connectivity information), while an user defined attribute is an accessory data that is useful for some specific algorithms, like "the average direction from which a vertex is visible".
|
||||
|
||||
|
@ -16,14 +16,14 @@ Once you have the handle retrieving and using the attributes is rather simple by
|
|||
|
||||
\snippet trimesh_attribute.cpp Using an attribute
|
||||
|
||||
You also have functions to check if a given attribute exists, retrieve an handle for it and eventually deleting it (using the handle or by name).
|
||||
Do not get mix up the scope of the handle with the memory allocation of the attribute. If you do not delete an attribute explicitly, it will be allocated until the mesh itself is destroyed, even if you do not have any more handles to it.
|
||||
You also have functions to check if a given attribute exists, to retrieve an handle for it and for, eventually, deleting it (using the handle or by name).
|
||||
Remember that the scope of a handle does not interfere with the memory allocation of the attribute. If you do not delete an attribute explicitly, it will stay allocated until the mesh itself is destroyed, even if you do not have any more handles to it.
|
||||
|
||||
\snippet trimesh_attribute.cpp Deleting an attribute
|
||||
|
||||
The same can be done for the faces, just replace the occurences of PerVertex with PerFace.
|
||||
The same can be done for edges, faces and for the mesh itself, just replace the occurences of PerVertex with PerFace, PerEdge and PerMesh.
|
||||
Note that if you call add an attribute without specifying a name and you lose the handle, you will not be able to get your handle back.
|
||||
Attributes can also be specified per mesh; in this case the access is done in a slightly different way.
|
||||
For attributes specified as per-mesh the access is done in a slightly different way.
|
||||
\snippet trimesh_attribute.cpp Per Mesh attribute
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
/** \page basic_concepts
|
||||
How to define a mesh type
|
||||
=====
|
||||
|
||||
The VCG Lib may encode a mesh in several ways, the most common of which is a set of vertices and set of triangles (i.e. triangles for triangle meshes, tetrahedra for tetrahedral meshes). The following line is an example of the definition of a VCG type of mesh:
|
||||
/** \page basic_concepts Basic Concepts
|
||||
How to define the type of a mesh
|
||||
=========================
|
||||
The VCG Lib may encode a mesh in several ways, the most common of which is a vector of vertices and vector of triangles (i.e. triangles for triangle meshes, tetrahedra for tetrahedral meshes). The following line is an example of the definition of a VCG type of mesh:
|
||||
|
||||
\dontinclude trimesh_base.cpp
|
||||
\skip MyMesh
|
|
@ -1,13 +0,0 @@
|
|||
/**
|
||||
\page examples
|
||||
|
||||
There are a number of very simple and short examples meant to document the various features of the library.
|
||||
|
||||
trimesh_base.cpp
|
||||
trimesh_optional
|
||||
trimesh_attribute.cpp
|
||||
|
||||
trimesh_normal.cpp
|
||||
|
||||
|
||||
*/
|
|
@ -1,4 +1,4 @@
|
|||
/** \page fileformat
|
||||
/** \page fileformat File Formats
|
||||
File Formats
|
||||
============
|
||||
VCGLib provides importer and exporter for several file formats
|
||||
|
|
|
@ -28,8 +28,9 @@ This module contains the documentation for the types and the functions used for
|
|||
/** \defgroup code_sample Code Examples
|
||||
\brief This module contains a number of small examples to explain the library features
|
||||
|
||||
All the example here reported are located under vcglib/apps/sample
|
||||
Each sample has a minimal '.pro' file
|
||||
All the examples here listed are located in the folder `vcglib/apps/sample`.
|
||||
To compile each sample, please use the corresponding `qmake` `*.pro` project files.
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
|
Loading…
Reference in New Issue