28 #ifndef MESHBUFFER2_HPP 29 #define MESHBUFFER2_HPP 220 #endif // MESHBUFFER2_HPP
void setFaceIndices(indexArray indices, size_t n)
addFaceIndices Adds the face index array that references to the vertex array
void setMaterials(std::vector< Material > &materials)
std::shared_ptr< MeshBuffer > MeshBufferPtr
void setFaceNormals(floatArr normals)
addFaceNormals Adds face normal information. The number of normals in the array are exspected to matc...
ucharArr getFaceColors(size_t &width)
getFaceColors Returns an array with wrgb colors
std::vector< Material > & getMaterials()
getTextures Returns a vector with materials
floatArr getTextureCoordinates()
getTextureCoordinates Returns an array with texture coordinates. Two normalized floats per vertex...
void setVertexColors(ucharArr colors, size_t w=3)
addVertexColors Adds vertex color information.
std::vector< Texture > & getTextures()
getTextures Returns a vector with textures
void setTextureCoordinates(floatArr coordinates)
addTextureCoordinates Adds texture coordinates for vertices
ucharArr getVertexColors(size_t &width)
getVertexColors Returns vertex color information or an empty array if vertex colors are not available...
indexArray getFaceIndices()
getFaceIndices Returns an array with face definitions, i.e., three vertex indices per face...
boost::shared_array< unsigned char > ucharArr
void setTextures(std::vector< Texture > &textures)
floatArr getVertices()
getVertices Return the vertex array.
bool hasFaceNormals() const
std::vector< Texture > m_textures
Vector containing all textures.
void setFaceMaterialIndices(indexArray indices)
addFaceMaterialIndices Adds face material indices. The array references to material definitions in m_...
bool hasVertexNormals() const
boost::shared_array< unsigned int > indexArray
boost::shared_array< float > floatArr
void setFaceColors(ucharArr colors, size_t w=3)
addFaceColors Adds face colors the the buffer
MeshBuffer()
MeshBuffer Contructor. Builds an empty buffer. Fill elements with add-Methods.
size_t numFaces() const
numFaces Number of faces in the mesh
void setVertexNormals(floatArr normals)
addVertexNormals Adds vertex normals.
indexArray getFaceMaterialIndices()
getFaceMaterialIndices Returns an array with face material indices
bool removeFloatChannel(const std::string &name)
Removes a float channel. If the type is not required use: erase.
std::vector< Material > m_materials
TODO: CHANNEL BASED SETTER / GETTER!
bool hasVertexColors() const
void setVertices(floatArr vertices, size_t n)
addVertices Adds the vertex array. Three floats per vertex
The MeshBuffer Mesh representation for I/O modules.
bool hasFaceColors() const
floatArr getFaceNormals()
getFaceNormas Returns an array containing face normals, i.e., three float values per face...
size_t numVertices() const
numVertices Number of vertices in the mesh
ChannelManager class Store and access AttributeChannels. It expands the MultiChannelMap with downwoar...
floatArr getVertexNormals()
getVertexNormals Returns an array with vertex normals or an empty array if no normals are present...