60 cout <<
"MeshBuffer::setVertexNormals(): " 61 <<
"Cannot add vertex normals without vertex definitions" << endl;
73 cout <<
"MeshBuffer::setVertexColors(): " 74 <<
"Cannot add vertex colors without vertex definitions" << endl;
86 cout <<
"MeshBuffer::setTextureCoordinates(): " 87 <<
"Cannot add vertex colors without vertex definitions" << endl;
107 cout <<
"MeshBuffer::setFaceMaterialIndices(): " 108 <<
"Cannot add material indices without face definitions" << endl;
120 cout <<
"MeshBuffer::setFaceMaterialIndices(): " 121 <<
"Cannot add material indices without face definitions" << endl;
133 cout <<
"MeshBuffer::setFaceColors(): " 134 <<
"Cannot add face colors without face definitions" << endl;
void setFaceIndices(indexArray indices, size_t n)
addFaceIndices Adds the face index array that references to the vertex array
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
floatArr getVertices()
getVertices Return the vertex array.
bool hasFaceNormals() const
UCharChannel::Optional UCharChannelOptional
std::vector< Texture > m_textures
Vector containing all textures.
void addFloatChannel(FloatChannelPtr data, const std::string &name)
Adds a float channel pointer to the map.
void setFaceMaterialIndices(indexArray indices)
addFaceMaterialIndices Adds face material indices. The array references to material definitions in m_...
bool hasVertexNormals() const
floatArr getFloatArray(const std::string &name, size_t &n, size_t &w)
Gets a float channel as array.
boost::shared_array< unsigned int > indexArray
ucharArr getUCharArray(const std::string &name, size_t &n, size_t &w)
Gets an uchar channel as array.
void addIndexChannel(IndexChannelPtr data, const std::string &name)
Adds an index channel pointer to the map. cointer to add. cannel.
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.
void addUCharChannel(UCharChannelPtr data, const std::string &name)
Adds an uchar channel pointer to the map.
size_t numFaces() const
numFaces Number of faces in the mesh
FloatChannel::Optional FloatChannelOptional
void setVertexNormals(floatArr normals)
addVertexNormals Adds vertex normals.
boost::optional< Channel< T > > Optional
indexArray getFaceMaterialIndices()
getFaceMaterialIndices Returns an array with face material indices
IndexChannel::Optional IndexChannelOptional
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
bool hasFaceColors() const
size_t numElements() 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...
indexArray getIndexArray(const std::string &name, size_t &n, size_t &w)
Gets an index channel as array.