MDLParser
Simple and modern library for parsing the Source engine model formats
|
#include <vvd.hpp>
Public Member Functions | |
Vvd (const std::weak_ptr< std::vector< std::byte > > &data, const std::optional< int32_t > &checksum=std::nullopt) | |
int32_t | getChecksum () const |
const std::vector< Structs::Vvd::Vertex > & | getVertices () const |
const std::vector< Structs::Vector4D > & | getTangents () const |
int32_t | getLevelsOfDetail () const |
Parses a .vtx file from a buffer into an easier to traverse structure using STL containers.
|
explicit |
Parses a .vvd 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. |
int32_t MdlParser::Vvd::getChecksum | ( | ) | const |
Gets the checksum shared by the MDL, VTX and VVD from the header.
int32_t MdlParser::Vvd::getLevelsOfDetail | ( | ) | const |
Gets the number of levels of detail (LoDs) that should be present in the model.
const std::vector< Vector4D > & MdlParser::Vvd::getTangents | ( | ) | const |
Gets the list of tangents in this VVD.
const std::vector< Vertex > & MdlParser::Vvd::getVertices | ( | ) | const |
Gets the list of vertices in this VVD.