Fermat
|
This class provides basic Mesh storage for either the host or device
#include <MeshStorage.h>
Public Methods | |
void | alloc (const int num_triangles, const int num_vertices, const int num_normals, const int num_texture_coordinates, const int num_groups) |
void | alloc_lightmap (const int num_lightmap_coordinates) |
void | compress_normals () |
void | compress_tex () |
SUTILAPI MeshMaterial * | alloc_materials (const size_t n) |
SUTILAPI char * | alloc_material_names (const size_t n_chars) |
SUTILAPI int | getNumVertices () const |
SUTILAPI int | getNumNormals () const |
SUTILAPI int | getNumTextureCoordinates () const |
SUTILAPI int | getNumTriangles () const |
SUTILAPI int | getNumGroups () const |
SUTILAPI int | getNumMaterials () const |
SUTILAPI int | getNumTextures () const |
SUTILAPI int | getVertexStride () const |
SUTILAPI int | getNormalStride () const |
SUTILAPI int | getTextureCoordinateStride () const |
SUTILAPI int * | getVertexIndices () |
SUTILAPI const int * | getVertexIndices () const |
SUTILAPI int * | getNormalIndices () |
SUTILAPI const int * | getNormalIndices () const |
SUTILAPI int * | getMaterialIndices () |
SUTILAPI const int * | getMaterialIndices () const |
SUTILAPI int * | getTextureCoordinateIndices () |
SUTILAPI const int * | getTextureCoordinateIndices () const |
SUTILAPI int * | getLightmapIndices () |
SUTILAPI const int * | getLightmapIndices () const |
SUTILAPI int * | getGroupOffsets () |
SUTILAPI const int * | getGroupOffsets () const |
SUTILAPI float * | getVertexData () |
SUTILAPI const float * | getVertexData () const |
SUTILAPI float * | getNormalData () |
SUTILAPI const float * | getNormalData () const |
SUTILAPI float * | getTextureCoordinateData () |
SUTILAPI const float * | getTextureCoordinateData () const |
SUTILAPI std::string & | getGroupName (const uint32 i) |
SUTILAPI const std::string & | getGroupName (const uint32 i) const |
SUTILAPI const char * | getMaterialName (const uint32 i) const |
SUTILAPI uint32 | insert_texture (const std::string &tex_name) |
SUTILAPI MeshView | view () |
void | reorder_triangles (const int *index) |
void | reset_groups (const int num_groups, const int *group_offsets) |
Public Members | |
int | m_num_vertices |
int | m_num_normals |
int | m_num_texture_coordinates |
int | m_num_lightmap_coordinates |
int | m_num_triangles |
int | m_num_groups |
int | m_vertex_stride |
int | m_normal_stride |
int | m_texture_stride |
float2 | m_tex_bias |
float2 | m_tex_scale |
float2 | m_lm_bias |
float2 | m_lm_scale |
std::map< std::string, uint32 > | m_textures_map |
std::vector< std::string > | m_textures |
std::vector< std::string > | m_group_names |
Buffer< int > | m_vertex_indices |
Buffer< int > | m_normal_indices |
Buffer< int > | m_normal_indices_comp |
Buffer< int > | m_material_indices |
Buffer< int > | m_texture_indices |
Buffer< int > | m_texture_indices_comp |
Buffer< int > | m_lightmap_indices |
Buffer< int > | m_lightmap_indices_comp |
Buffer< int > | m_group_offsets |
Buffer< float > | m_vertex_data |
Buffer< float > | m_normal_data |
Buffer< uint32 > | m_normal_data_comp |
Buffer< float > | m_texture_data |
Buffer< float > | m_lightmap_data |
Buffer< MeshMaterial > | m_materials |
Buffer< char > | m_material_names |
Buffer< int > | m_material_name_offsets |