|
MDLParser
Simple and modern library for parsing the Source engine model formats
|
Functions | |
| void | iterateBodyParts (const Mdl &mdl, const Vtx &vtx, const std::function< void(const Mdl::BodyPart &, const Vtx::BodyPart &)> &iteratee) |
| void | iterateModels (const Mdl::BodyPart &mdlBodyPart, const Vtx::BodyPart &vtxBodyPart, const std::function< void(const Mdl::Model &, const Vtx::Model &)> &iteratee) |
| void | iterateMeshes (const Mdl::Model &mdlModel, const Vtx::ModelLod &vtxModel, const std::function< void(const Mdl::Mesh &, const Vtx::Mesh &)> &iteratee) |
| void | iterateVertices (const Vvd &vvd, const Mdl::Model &model, const Mdl::Mesh &mesh, const Vtx::StripGroup &stripGroup, const std::function< void(const Structs::Vtx::Vertex &, const Structs::Vvd::Vertex &, const Structs::Vector4D &)> &iteratee) |
A collection of helper functions to ease traversing the MDL, VTX and VVD structures together.
| void MdlParser::Accessors::iterateBodyParts | ( | const Mdl & | mdl, |
| const Vtx & | vtx, | ||
| const std::function< void(const Mdl::BodyPart &, const Vtx::BodyPart &)> & | iteratee | ||
| ) |
Iterates over the pairs of body parts in the MDL and VTX data, calling iteratee with each pair.
| mdl | MDL data. |
| vtx | VTX data. |
| iteratee | Function to be called for each pair, taking the MDL body part followed by the VTX body part. |
| void MdlParser::Accessors::iterateMeshes | ( | const Mdl::Model & | mdlModel, |
| const Vtx::ModelLod & | vtxModel, | ||
| const std::function< void(const Mdl::Mesh &, const Vtx::Mesh &)> & | iteratee | ||
| ) |
Iterates over the pairs of meshes in the MDL and VTX data, calling iteratee with each pair.
| mdlModel | Model in the MDL data. |
| vtxModel | Model in the VTX data. |
| iteratee | Function to be called for each pair, taking the MDL mesh followed by the VTX mesh. |
| void MdlParser::Accessors::iterateModels | ( | const Mdl::BodyPart & | mdlBodyPart, |
| const Vtx::BodyPart & | vtxBodyPart, | ||
| const std::function< void(const Mdl::Model &, const Vtx::Model &)> & | iteratee | ||
| ) |
Iterates over the pairs of models in the MDL and VTX data, calling iteratee with each pair.
| mdlBodyPart | Body part in the MDL data. |
| vtxBodyPart | Body part in the VTX data. |
| iteratee | Function to be called for each pair, taking the MDL model followed by the VTX model. |
| void MdlParser::Accessors::iterateVertices | ( | const Vvd & | vvd, |
| const Mdl::Model & | model, | ||
| const Mdl::Mesh & | mesh, | ||
| const Vtx::StripGroup & | stripGroup, | ||
| const std::function< void(const Structs::Vtx::Vertex &, const Structs::Vvd::Vertex &, const Structs::Vector4D &)> & | iteratee | ||
| ) |
Iterates over the vertex data for the given strip group, calling iteratee with the VTX and VVD vertex data plus the tangent.
| vvd | Parsed VVD containing per-vertex data. |
| model | Parsed model from the MDL containing offsets into the VVD. |
| mesh | Parsed mesh from the MDL containing offsets into the VVD. |
| stripGroup | VTX strip group to read vertex data from. |
| iteratee | Function to be called for each vertex, taking the VTX vertex, VVD vertex and tangent (in that order). |