WSM API v25.0.0 (2025.0.0)
Loading...
Searching...
No Matches
WSM::Utils::MeshData Class Reference

Description

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.
 

Member Function Documentation

◆ ApplyTransform()

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.

Member Data Documentation

◆ m_aIndices

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]).

◆ m_aNormals

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.

◆ m_aUVs

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().

◆ m_aVertices

std::vector<float> WSM::Utils::MeshData::m_aVertices

Each vertex is formed by taking 3 consecutive floats.

◆ m_nMaterialIndex

size_t WSM::Utils::MeshData::m_nMaterialIndex = WSM::INVALID_SIZE

An index into the material vector in GetAllRenderingInformation.


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