7 #ifndef CAFU_HL2_MDL_VTX_STRIPS_DATA_HPP_INCLUDED
8 #define CAFU_HL2_MDL_VTX_STRIPS_DATA_HPP_INCLUDED
13 #elif defined(__GNUG__)
14 #define GCC_PACKED __attribute__ ((packed))
48 uint8_t
Bone[HL2mdl_MAX_NUM_BONES_PER_VERT];
51 std::ostream& print(std::ostream& os,
const char* indent)
const;
65 uint32_t IndicesOffset;
73 uint32_t NumBoneStateChanges;
74 uint32_t BoneStateChangesOffset;
82 std::ostream& print(std::ostream& os,
const char* indent)
const;
89 enum FlagsT { IS_FLEXED = 1, IS_HWSKINNED = 2, IS_DELTA_FLEXED = 4 };
95 uint32_t IndicesOffset;
98 uint32_t StripsOffset;
105 return (
vtxVertexT*)(((uint8_t*)
this) + VertsOffset);
108 uint16_t* GetIndices()
const
110 return (uint16_t*)(((uint8_t*)
this) + IndicesOffset);
115 return (
vtxStripT*)(((uint8_t*)
this) + StripsOffset);
118 std::ostream& print(std::ostream& os,
const char* indent)
const;
127 enum FlagsT { IS_TEETH = 1, IS_EYES = 2 };
129 uint32_t NumStripGroups;
130 uint32_t StripGroupsOffset;
139 std::ostream& print(std::ostream& os,
const char* indent)
const;
146 uint32_t MeshesOffset;
152 return (
vtxMeshT*)(((uint8_t*)
this) + MeshesOffset);
155 std::ostream& print(std::ostream& os,
const char* indent)
const;
171 std::ostream& print(std::ostream& os,
const char* indent)
const;
179 uint32_t ModelsOffset;
184 return (
vtxModelT*)(((uint8_t*)
this) + ModelsOffset);
187 std::ostream& print(std::ostream& os,
const char* indent)
const;
194 uint32_t ReplacementMatNameOffset;
197 const char* GetMaterialReplacementName()
const
199 return (
const char*)(((uint8_t*)
this) + ReplacementMatNameOffset);
208 uint32_t NumMatReplacements;
209 uint32_t MatReplacementsOffset;
231 uint16_t MaxBonesPerStrip;
232 uint16_t MaxBonesPerTri;
233 uint32_t MaxBonesPerVert;
240 uint32_t NumBodyParts;
241 uint32_t BodyPartsOffset;
253 return (
vtxBodyPartT*)(((uint8_t*)
this) + BodyPartsOffset);
256 std::ostream& print(std::ostream& os,
const char* indent)
const;
261 #if defined(_MSC_VER)
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?
Definition: Loader_mdl_hl2_vtx.hpp:40
Definition: Loader_mdl_hl2_vtx.hpp:20
uint16_t Sibling
See class description for usage.
Definition: Loader_mdl_hl2_vtx.hpp:42
This class corresponds to StudioBodyPartT in the mdl file.
Definition: Loader_mdl_hl2_vtx.hpp:176
uint16_t NumBones
What's this? The max. number of bones to be used, clamping/overriding the value in vtxVertexT...
Definition: Loader_mdl_hl2_vtx.hpp:70
A strip group is a locking group, representing a single vertex buffer and a single index buffer...
Definition: Loader_mdl_hl2_vtx.hpp:87
This class corresponds to StudioVertexT in the vvd file.
Definition: Loader_mdl_hl2_vtx.hpp:38
This class corresponds to StudioMeshT in the mdl file.
Definition: Loader_mdl_hl2_vtx.hpp:125
uint8_t NumBones
Same as sv.BoneWeights.NumBones.
Definition: Loader_mdl_hl2_vtx.hpp:41
Definition: Loader_mdl_hl2_vtx.hpp:206
uint32_t NumMeshes
One vtxMeshT for each StudioMeshT.
Definition: Loader_mdl_hl2_vtx.hpp:145
May contain degenerate triangles.
Definition: Loader_mdl_hl2_vtx.hpp:61
uint32_t NumLODs
Must match the NumLODs value in StripsHeaderT.
Definition: Loader_mdl_hl2_vtx.hpp:162
Definition: Loader_mdl_hl2_vtx.hpp:191
A strip is a portion of a strip group.
Definition: Loader_mdl_hl2_vtx.hpp:56
FlagsT
Definition: Loader_mdl_hl2_vtx.hpp:58
This class corresponds to StudioModelT in the mdl file.
Definition: Loader_mdl_hl2_vtx.hpp:160
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.
Definition: Loader_mdl_hl2_vtx.hpp:48
Definition: Loader_mdl_hl2_vtx.hpp:143