From 320609995cf13f583e851f3b83ba7a58da87e26d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 18 Jun 2012 12:54:15 +0200 Subject: [PATCH] Minor documentation updates. Using [in,out] for MeshTools function parameters for better clarity. --- src/MeshTools/Clean.h | 20 ++++++++++---------- src/MeshTools/CombineIndexedArrays.h | 2 +- src/MeshTools/CompressIndices.h | 2 +- src/MeshTools/FlipNormals.h | 6 +++--- src/MeshTools/Subdivide.h | 4 ++-- src/MeshTools/Tipsify.h | 6 +++--- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/MeshTools/Clean.h b/src/MeshTools/Clean.h index 643d17136..004a139c1 100644 --- a/src/MeshTools/Clean.h +++ b/src/MeshTools/Clean.h @@ -77,8 +77,8 @@ template 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, HashedVertex>(Math::Vector::from(index), v)); *it = result.first->second.newIndex; @@ -121,14 +121,14 @@ template 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. */ diff --git a/src/MeshTools/CombineIndexedArrays.h b/src/MeshTools/CombineIndexedArrays.h index d8b1dc7b9..4ed096639 100644 --- a/src/MeshTools/CombineIndexedArrays.h +++ b/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 diff --git a/src/MeshTools/CompressIndices.h b/src/MeshTools/CompressIndices.h index 3c2a90665..bbfe171c9 100644 --- a/src/MeshTools/CompressIndices.h +++ b/src/MeshTools/CompressIndices.h @@ -107,9 +107,9 @@ inline std::tuple compressIndices(const std::vector&), but this function writes the output to mesh's index buffer and updates index count and diff --git a/src/MeshTools/FlipNormals.h b/src/MeshTools/FlipNormals.h index 77dd880e8..baa79e0f0 100644 --- a/src/MeshTools/FlipNormals.h +++ b/src/MeshTools/FlipNormals.h @@ -46,8 +46,8 @@ void MESHTOOLS_EXPORT flipNormals(std::vector& 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&) and @@ -65,4 +65,4 @@ inline void flipNormals(std::vector& indices, std::vector }} -#endif \ No newline at end of file +#endif diff --git a/src/MeshTools/Subdivide.h b/src/MeshTools/Subdivide.h index 37e1f02e7..4202799d3 100644 --- a/src/MeshTools/Subdivide.h +++ b/src/MeshTools/Subdivide.h @@ -88,8 +88,8 @@ template 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)` diff --git a/src/MeshTools/Tipsify.h b/src/MeshTools/Tipsify.h index ae7e935ba..d92b972fc 100644 --- a/src/MeshTools/Tipsify.h +++ b/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: