Browse Source

Minor documentation updates.

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

2
src/MeshTools/CombineIndexedArrays.h

@ -91,7 +91,7 @@ class CombineIndexedArrays {
/** @ingroup mesh /** @ingroup mesh
@brief Combine indexed arrays @brief Combine indexed arrays
@param indexedArrays Index and attribute arrays @param[in,out] indexedArrays Index and attribute arrays
@return Array with resulting indices @return Array with resulting indices
When you have e.g. vertex, normal and texture array, each indexed with 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 @brief Compress vertex indices and write them to index buffer
@param indices Index array
@param mesh Output mesh @param mesh Output mesh
@param usage Index buffer usage @param usage Index buffer usage
@param indices Index array
The same as compressIndices(const std::vector<unsigned int>&), but this 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 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 @brief Flip mesh normals and face winding
@param indices Index array to operate on @param[in,out] indices Index array to operate on
@param normals Normal 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 Flips normal vectors and face winding in index array for face culling to work
properly too. See also flipNormals(std::vector<Vector3>&) and 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 @brief %Subdivide the mesh
@tparam Vertex Vertex data type @tparam Vertex Vertex data type
@tparam Interpolator See `interpolator` function parameter @tparam Interpolator See `interpolator` function parameter
@param indices Index array to operate on @param[in,out] indices Index array to operate on
@param vertices Vertex array to operate on @param[in,out] vertices Vertex array to operate on
@param interpolator Functor or function pointer which interpolates @param interpolator Functor or function pointer which interpolates
two adjacent vertices: `Vertex interpolator(Vertex a, Vertex b)` two adjacent vertices: `Vertex interpolator(Vertex a, Vertex b)`

6
src/MeshTools/Tipsify.h

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

Loading…
Cancel
Save