MDLParser
Simple and modern library for parsing the Source engine model formats
|
#include <vtx.hpp>
Classes | |
struct | BodyPart |
struct | MaterialReplacement |
struct | Mesh |
struct | Model |
struct | ModelLod |
struct | Strip |
struct | StripGroup |
Public Member Functions | |
Vtx (const std::weak_ptr< std::vector< std::byte > > &data, const std::optional< int32_t > &checksum=std::nullopt) | |
int32_t | getChecksum () const |
const std::vector< MaterialReplacement > & | getMaterialReplacements (const int lod) const |
const std::vector< BodyPart > & | getBodyParts () const |
Parses a .vtx file from a buffer into an easier to traverse structure using STL containers.
|
explicit |
Parses a .vtx file contained in the given buffer into an easier to use and more modern structure. No ownership of the data is taken as all contents are copied into new structs.
data | |
checksum | Optional checksum to validate against the header's |
const std::vector< Vtx::BodyPart > & MdlParser::Vtx::getBodyParts | ( | ) | const |
Gets the body parts (body groups) which make up this model.
int32_t MdlParser::Vtx::getChecksum | ( | ) | const |
Gets the checksum shared by the MDL, VTX and VVD from the header.
const std::vector< Vtx::MaterialReplacement > & MdlParser::Vtx::getMaterialReplacements | ( | const int | lod | ) | const |
Gets the material replacements for a given level of detail.
lod |