7 #ifndef CAFU_HL2_MDL_VVD_VERTEX_DATA_HPP_INCLUDED
8 #define CAFU_HL2_MDL_VVD_VERTEX_DATA_HPP_INCLUDED
10 #include "Math3D/Vector3.hpp"
11 #include "Templates/Array.hpp"
13 #if defined(_WIN32) && _MSC_VER<1600
20 #define HL2mdl_MAX_NUM_BONES_PER_VERT 3
21 #define HL2mdl_MAX_NUM_LODS 8
26 typedef float Vector2D[2];
37 float Weight[HL2mdl_MAX_NUM_BONES_PER_VERT];
38 uint8_t Bone[HL2mdl_MAX_NUM_BONES_PER_VERT];
50 std::ostream& print(std::ostream& os,
const char* indent)
const;
60 std::ostream& print(std::ostream& os,
const char* indent)
const;
96 const FixupT* GetFixups()
const
109 const FixupT& Fixup = GetFixups()[i];
113 const StudioVertexT* Vertices = GetVertices() + Fixup.StartVertex;
115 for (uint32_t VertNr = 0; VertNr < Fixup.NumVertices; VertNr++)
116 NewVertices.PushBack(Vertices[VertNr]);
121 const Vector4D* Tangents = GetTangents() + Fixup.StartVertex;
123 for (uint32_t VertNr = 0; VertNr < Fixup.NumVertices; VertNr++)
124 NewTangents.PushBack(Tangents[VertNr]);
128 for (uint32_t VertNr = 0; VertNr < NewVertices.
Size(); VertNr++)
129 GetVertices()[VertNr] = NewVertices[VertNr];
131 for (uint32_t VertNr = 0; VertNr < NewTangents.
Size(); VertNr++)
132 GetTangents()[VertNr] = NewTangents[VertNr];
137 std::ostream& print(std::ostream& os,
const char* indent)
const;
Definition: Loader_mdl_hl2_vvd.hpp:29
unsigned long Size() const
Get size of array.
Definition: Array.hpp:138
uint32_t StartVertex
Begin of the "fixup strip".
Definition: Loader_mdl_hl2_vvd.hpp:57
Definition: Loader_mdl_hl2_vvd.hpp:35
uint32_t LOD
Can use this to skip higher LODs.
Definition: Loader_mdl_hl2_vvd.hpp:56
Definition: Loader_mdl_hl2_vvd.hpp:43
Definition: Loader_mdl_hl2_vvd.hpp:54
uint32_t NumVertices
Length of the "fixup strip".
Definition: Loader_mdl_hl2_vvd.hpp:58
Definition: Renderer.hpp:16