Data that can be used to draw a single mesh.
#include <WSMUtility.h>
Public Member Functions | |
void | ApplyTransform (const WSM::Transf3d &t) |
Method applies a transform to the mesh data. | |
Public Attributes | |
std::vector< uint32_t > | m_aIndices |
Each triangle is formed by taking 3 consecutive indices where index i refers to triangle (m_aVertices[3 * i], m_aVertices[3 * i + 1], m_aVertices[3 * i + 2]). | |
std::vector< float > | m_aVertices |
Each vertex is formed by taking 3 consecutive floats. | |
std::vector< float > | m_aNormals |
Each normals is formed by taking 3 consecutive floats. | |
std::vector< float > | m_aUVs |
Each uv is formed by taking 2 consecutive floats. | |
size_t | m_nMaterialIndex = WSM::INVALID_SIZE |
An index into the material vector in GetAllRenderingInformation. | |
void WSM::Utils::MeshData::ApplyTransform | ( | const WSM::Transf3d & | t | ) |
Method applies a transform to the mesh data.
It fixes normals and changes triangle indices in mirror cases.
std::vector<uint32_t> WSM::Utils::MeshData::m_aIndices |
Each triangle is formed by taking 3 consecutive indices where index i refers to triangle (m_aVertices[3 * i], m_aVertices[3 * i + 1], m_aVertices[3 * i + 2]).
std::vector<float> WSM::Utils::MeshData::m_aNormals |
Each normals is formed by taking 3 consecutive floats.
Could be empty, otherwise same length as m_aVertices.
std::vector<float> WSM::Utils::MeshData::m_aUVs |
Each uv is formed by taking 2 consecutive floats.
Could be empty, otherwsie m_UVs.size() * 3 / 2 = m_aVertices.size().
std::vector<float> WSM::Utils::MeshData::m_aVertices |
Each vertex is formed by taking 3 consecutive floats.
size_t WSM::Utils::MeshData::m_nMaterialIndex = WSM::INVALID_SIZE |
An index into the material vector in GetAllRenderingInformation.