Browse Source

Doc++ (positions, not vertices).

pull/279/head
Vladimír Vondruš 14 years ago
parent
commit
b90ba53f2e
  1. 6
      src/MeshTools/CombineIndexedArrays.h

6
src/MeshTools/CombineIndexedArrays.h

@ -106,18 +106,18 @@ of some STL functions like shown below. Also if one index array is shader by
more than one attribute array, just pass the index array more times. Example: more than one attribute array, just pass the index array more times. Example:
@code @code
std::vector<unsigned int> vertexIndices; std::vector<unsigned int> vertexIndices;
std::vector<Vector4> vertices; std::vector<Vector4> positions;
std::vector<unsigned int> normalTextureIndices; std::vector<unsigned int> normalTextureIndices;
std::vector<Vector3> normals; std::vector<Vector3> normals;
std::vector<Vector2> textureCoordinates; std::vector<Vector2> textureCoordinates;
std::vector<unsigned int> indices = MeshTools::combineIndexedArrays( std::vector<unsigned int> indices = MeshTools::combineIndexedArrays(
std::make_tuple(std::cref(vertexIndices), std::ref(vertices)), std::make_tuple(std::cref(vertexIndices), std::ref(positions)),
std::make_tuple(std::cref(normalTextureIndices), std::ref(normals)), std::make_tuple(std::cref(normalTextureIndices), std::ref(normals)),
std::make_tuple(std::cref(normalTextureIndices), std::ref(textureCoordinates)) std::make_tuple(std::cref(normalTextureIndices), std::ref(textureCoordinates))
); );
@endcode @endcode
`vertices`, `normals` and `textureCoordinates` will then contain combined `positions`, `normals` and `textureCoordinates` will then contain combined
attributes indexed with `indices`. attributes indexed with `indices`.
@attention All index arrays should have the same size, otherwise zero-length @attention All index arrays should have the same size, otherwise zero-length

Loading…
Cancel
Save