Cafu Engine
HL2mdl::vtxVertexT Struct Reference

This class corresponds to StudioVertexT in the vvd file. More...

#include "Loader_mdl_hl2_vtx.hpp"

Public Member Functions

std::ostream & print (std::ostream &os, const char *indent) const
 

Public Attributes

uint8_t BoneWeightIndex [HL2mdl_MAX_NUM_BONES_PER_VERT]
 These index into sv's bones. Can this ever be different from [0, 1, 2]? If so, why? More...
 
uint8_t NumBones
 Same as sv.BoneWeights.NumBones. More...
 
uint16_t Sibling
 See class description for usage. More...
 
uint8_t Bone [HL2mdl_MAX_NUM_BONES_PER_VERT]
 For software-skinned vertices, these are indices into the mdl file's list of bones, that is, same as sv.BoneWeights.Bone[i] for each i < NumBones. More...
 

Detailed Description

This class corresponds to StudioVertexT in the vvd file.

It works like this: If we have these instances:

vtxVertexT  vtxVertex;
vtxMeshT    vtxMesh;    // The mesh related to vtxVertex.
StudioMeshT StudioMesh; // The mesh sibling related to vtxMesh.

then the StudioVertexT related to vtxVertex is found like this:

StudioVertexT sv = StudioMesh.GetVertices()[vtxVert.Sibling];

Member Data Documentation

uint8_t HL2mdl::vtxVertexT::Bone[HL2mdl_MAX_NUM_BONES_PER_VERT]

For software-skinned vertices, these are indices into the mdl file's list of bones, that is, same as sv.BoneWeights.Bone[i] for each i < NumBones.

For hardware-skinned vertices, these are hardware bone indices (different from software-skinned vertices if the hardware limits the max number of bones??).

uint8_t HL2mdl::vtxVertexT::BoneWeightIndex[HL2mdl_MAX_NUM_BONES_PER_VERT]

These index into sv's bones. Can this ever be different from [0, 1, 2]? If so, why?

uint8_t HL2mdl::vtxVertexT::NumBones

Same as sv.BoneWeights.NumBones.

uint16_t HL2mdl::vtxVertexT::Sibling

See class description for usage.


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