![]() |
MAGE
v0.171.0
Matthias Advanced Game Engine
|
#include <msh_reader.hpp>
Public Member Functions | |
MSHReader (std::vector< VertexT > &vertices, std::vector< IndexT > &indices) | |
MSHReader (const MSHReader &reader)=delete | |
MSHReader (MSHReader &&reader) noexcept | |
~MSHReader () | |
MSHReader & | operator= (const MSHReader &reader)=delete |
MSHReader & | operator= (MSHReader &&reader)=delete |
void | ReadFromFile (std::filesystem::path path) |
void | ReadFromMemory (gsl::span< const U8 > input) |
Private Member Functions | |
virtual void | ReadData () override |
bool | IsHeaderValid () |
![]() | |
BigEndianBinaryReader & | operator= (const BigEndianBinaryReader &reader)=delete |
BigEndianBinaryReader & | operator= (BigEndianBinaryReader &&reader) noexcept |
void | ReadFromFile (std::filesystem::path path) |
void | ReadFromMemory (gsl::span< const U8 > input) |
BigEndianBinaryReader () | |
BigEndianBinaryReader (const BigEndianBinaryReader &reader)=delete | |
BigEndianBinaryReader (BigEndianBinaryReader &&reader) noexcept | |
~BigEndianBinaryReader () | |
const std::filesystem::path & | GetPath () const noexcept |
bool | ContainsChars () const noexcept |
template<typename T > | |
const T | Read () |
template<typename T > | |
const T * | ReadArray (std::size_t count) |
Private Attributes | |
std::vector< VertexT > & | m_vertices |
std::vector< IndexT > & | m_indices |
A class of MSH file readers for reading meshes.
VertexT | The vertex type. |
IndexT | The index type. |
|
explicit |
Constructs a MSH reader.
[in,out] | vertices | A reference to a vector for storing the read vertices from file. |
[in,out] | indices | A reference to a vector for storing the read indices from file. |
|
delete |
Constructs a MSH reader from the given MSH reader.
[in] | reader | A reference to the MSH reader to copy. |
|
noexcept |
Constructs a MSH reader by moving the given MSH reader.
[in] | reader | A reference to the MSH reader to move. |
mage::rendering::loader::MSHReader< VertexT, IndexT >::~MSHReader | ( | ) |
Destructs this MSH reader.
|
private |
Checks whether the header of the file is valid.
true
if the header of the file is valid. false
otherwise.
|
delete |
Copies the given MSH reader to this MSH reader.
[in] | reader | A reference to a MSH reader to copy. |
|
delete |
Moves the given MSH reader to this MSH reader.
[in] | reader | A reference to a MSH reader to move. |
|
overrideprivatevirtual |
Starts reading.
Exception | Failed to read from the given file. |
Implements mage::BigEndianBinaryReader.
void mage::BigEndianBinaryReader::ReadFromFile |
Reads from the file associated with the given path.
[in] | path | The path. |
Exception | Failed to read from the file. |
void mage::BigEndianBinaryReader::ReadFromMemory |
Reads the input string.
[in] | input | The input byte string. |
Exception | Failed to read from the given input string. |
|
private |
A reference to a vector containing the read indices of this MSH reader.
|
private |
A reference to a vector containing the read vertices of this MSH reader.