Browse Source

Minor documentation updates.

Using [in,out] for MeshTools function parameters for better clarity.
vectorfields
Vladimír Vondruš 14 years ago
parent
commit
320609995c
  1. 20
      src/MeshTools/Clean.h
  2. 2
      src/MeshTools/CombineIndexedArrays.h
  3. 2
      src/MeshTools/CompressIndices.h
  4. 6
      src/MeshTools/FlipNormals.h
  5. 4
      src/MeshTools/Subdivide.h
  6. 6
      src/MeshTools/Tipsify.h

20
src/MeshTools/Clean.h

@ -77,8 +77,8 @@ template<class Vertex, size_t vertexSize = Vertex::Size> class Clean {
index[ii] = (vertices[*it][ii]+moved[ii]-min[ii])/epsilon;
/* Try inserting the vertex into table, if it already
exists, change vertex pointer of the face to already
existing vertex */
exists, change vertex pointer of the face to already
existing vertex */
HashedVertex v(*it, table.size());
auto result = table.insert(std::pair<Math::Vector<vertexSize, size_t>, HashedVertex>(Math::Vector<vertexSize, size_t>::from(index), v));
*it = result.first->second.newIndex;
@ -121,14 +121,14 @@ template<class Vertex, size_t vertexSize = Vertex::Size> class Clean {
/** @ingroup mesh
@brief %Clean the mesh
@tparam Vertex Vertex data type
@tparam vertexSize How many initial vertex fields are important (for example,
when dealing with perspective in 3D space, only first three fields of
otherwise 4D vertex are important)
@param indices Index array to operate on
@param vertices Vertex array to operate on
@param epsilon Epsilon value, vertices nearer than this distance will be
melt together.
@tparam Vertex Vertex data type
@tparam vertexSize How many initial vertex fields are important (for
example, when dealing with perspective in 3D space, only first three
fields of otherwise 4D vertex are important)
@param[in,out] indices Index array to operate on
@param[in,out] vertices Vertex array to operate on
@param[in] epsilon Epsilon value, vertices nearer than this distance will
be melt together.
Removes duplicate vertices from the mesh.
*/

2
src/MeshTools/CombineIndexedArrays.h

@ -91,7 +91,7 @@ class CombineIndexedArrays {
/** @ingroup mesh
@brief Combine indexed arrays
@param indexedArrays Index and attribute arrays
@param[in,out] indexedArrays Index and attribute arrays
@return Array with resulting indices
When you have e.g. vertex, normal and texture array, each indexed with

2
src/MeshTools/CompressIndices.h

@ -107,9 +107,9 @@ inline std::tuple<size_t, Type, char*> compressIndices(const std::vector<unsigne
/**
@brief Compress vertex indices and write them to index buffer
@param indices Index array
@param mesh Output mesh
@param usage Index buffer usage
@param indices Index array
The same as compressIndices(const std::vector<unsigned int>&), but this
function writes the output to mesh's index buffer and updates index count and

6
src/MeshTools/FlipNormals.h

@ -46,8 +46,8 @@ void MESHTOOLS_EXPORT flipNormals(std::vector<Vector3>& normals);
/**
@brief Flip mesh normals and face winding
@param indices Index array to operate on
@param normals Normal array to operate on
@param[in,out] indices Index array to operate on
@param[in,out] normals Normal array to operate on
Flips normal vectors and face winding in index array for face culling to work
properly too. See also flipNormals(std::vector<Vector3>&) and
@ -65,4 +65,4 @@ inline void flipNormals(std::vector<unsigned int>& indices, std::vector<Vector3>
}}
#endif
#endif

4
src/MeshTools/Subdivide.h

@ -88,8 +88,8 @@ template<class Vertex, class Interpolator> class Subdivide {
@brief %Subdivide the mesh
@tparam Vertex Vertex data type
@tparam Interpolator See `interpolator` function parameter
@param indices Index array to operate on
@param vertices Vertex array to operate on
@param[in,out] indices Index array to operate on
@param[in,out] vertices Vertex array to operate on
@param interpolator Functor or function pointer which interpolates
two adjacent vertices: `Vertex interpolator(Vertex a, Vertex b)`

6
src/MeshTools/Tipsify.h

@ -53,9 +53,9 @@ class MESHTOOLS_EXPORT Tipsify {
/** @ingroup mesh
@brief %Tipsify the mesh
@param indices Indices array to operate on
@param vertexCount Vertex count
@param cacheSize Post-transform vertex cache size
@param[in,out] indices Indices array to operate on
@param[in] vertexCount Vertex count
@param[in] cacheSize Post-transform vertex cache size
Optimizes the mesh for vertex-bound applications by rearranging its index
array for beter usage of post-transform vertex cache. Algorithm used:

Loading…
Cancel
Save