molecular
Classes | Public Member Functions | List of all members
molecular::util::Mesh Class Reference

Intermediate representation of mesh data. More...

#include <Mesh.h>

Classes

class  Attribute
 Single attribute buffer. More...
 

Public Member Functions

 Mesh (unsigned int numVertices, IndexBufferInfo::Mode mode=IndexBufferInfo::Mode::kTriangles)
 Construct from number of vertices. More...
 
 Mesh (const Mesh &)=delete
 
 Mesh (Mesh &&)=default
 
template<typename T >
void SetAttributeData (Hash name, const T *data, size_t count)
 
void SetAttributeData (Hash name, VertexAttributeInfo::Type type, unsigned int components, const void *data, size_t size)
 Set attribute data from raw data. More...
 
std::vector< uint32_t > & GetIndices ()
 
const std::vector< uint32_t > & GetIndices () const
 
IndexBufferInfo::Mode GetMode () const
 
void SetMode (IndexBufferInfo::Mode mode)
 
const std::string & GetMaterial () const
 
void SetMaterial (const std::string &material)
 
unsigned int GetNumVertices () const
 
const std::unordered_map< Hash, Attribute > & GetAttributes () const
 
std::unordered_map< Hash, Attribute > & GetAttributes ()
 
const AttributeGetAttribute (Hash name) const
 
AttributeGetAttribute (Hash name)
 
void RemoveAttribute (Hash name)
 

Detailed Description

Intermediate representation of mesh data.

Constructor & Destructor Documentation

molecular::util::Mesh::Mesh ( unsigned int  numVertices,
IndexBufferInfo::Mode  mode = IndexBufferInfo::Mode::kTriangles 
)
inlineexplicit

Construct from number of vertices.

Parameters
numVerticesNumber of vertices. NOT number of indices.
molecular::util::Mesh::Mesh ( const Mesh )
delete
molecular::util::Mesh::Mesh ( Mesh &&  )
default

Member Function Documentation

const Attribute& molecular::util::Mesh::GetAttribute ( Hash  name) const
inline
Attribute& molecular::util::Mesh::GetAttribute ( Hash  name)
inline
const std::unordered_map<Hash, Attribute>& molecular::util::Mesh::GetAttributes ( ) const
inline
std::unordered_map<Hash, Attribute>& molecular::util::Mesh::GetAttributes ( )
inline
std::vector<uint32_t>& molecular::util::Mesh::GetIndices ( )
inline
const std::vector<uint32_t>& molecular::util::Mesh::GetIndices ( ) const
inline
const std::string& molecular::util::Mesh::GetMaterial ( ) const
inline
IndexBufferInfo::Mode molecular::util::Mesh::GetMode ( ) const
inline
unsigned int molecular::util::Mesh::GetNumVertices ( ) const
inline
void molecular::util::Mesh::RemoveAttribute ( Hash  name)
inline
template<typename T >
void molecular::util::Mesh::SetAttributeData ( Hash  name,
const T *  data,
size_t  count 
)
inline
void molecular::util::Mesh::SetAttributeData ( Hash  name,
VertexAttributeInfo::Type  type,
unsigned int  components,
const void *  data,
size_t  size 
)
inline

Set attribute data from raw data.

void molecular::util::Mesh::SetMaterial ( const std::string &  material)
inline
void molecular::util::Mesh::SetMode ( IndexBufferInfo::Mode  mode)
inline

The documentation for this class was generated from the following file: