SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Toggle main menu visibility
Loading...
Searching...
No Matches
VVD.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <array>
4
#include <cstddef>
5
#include <cstdint>
6
#include <vector>
7
8
#include "
MDL.h
"
9
10
namespace
mdlpp::VVD
{
11
12
struct
Fixup
{
13
int32_t
LOD
;
14
int32_t
sourceVertexID
;
15
int32_t
vertexCount
;
16
};
17
18
struct
BoneWeight
{
19
//float weight[MAX_BONES_PER_VERTEX];
20
std::array<float, MAX_BONES_PER_VERTEX>
weight
;
21
22
//int8_t bone[MAX_BONES_PER_VERTEX];
23
//int8_t boneCount;
24
std::vector<int8_t>
bones
;
25
};
26
27
struct
Vertex
{
28
BoneWeight
boneWeight
;
29
30
sourcepp::math::Vec3f
position
{};
31
sourcepp::math::Vec3f
normal
{};
32
sourcepp::math::Vec2f
uv
{};
33
34
sourcepp::math::Vec4f
tangent
{};
// Taken from tangents data section
35
};
36
37
struct
VVD
{
38
[[nodiscard]]
bool
open
(
const
std::byte* data, std::size_t size,
const
MDL::MDL
& mdl);
39
40
//int32_t id;
41
int32_t
version
;
42
//int32_t checksum;
43
44
int32_t
numLODs
;
45
//int32_t numVerticesInLOD[MAX_LOD_COUNT];
46
std::array<int32_t, MAX_LOD_COUNT>
numVerticesInLOD
;
47
48
//int32_t fixupsCount;
49
//int32_t fixupsOffset;
50
std::vector<Fixup>
fixups
;
51
52
//int32_t verticesOffset;
53
std::vector<Vertex>
vertices
;
54
//int32_t tangentsOffset;
55
};
56
57
}
// namespace mdlpp::VVD
MDL.h
mdlpp::VVD
Definition
VVD.h:10
mdlpp::MDL::MDL
Definition
MDL.h:681
mdlpp::VVD::BoneWeight
Definition
VVD.h:18
mdlpp::VVD::BoneWeight::weight
std::array< float, MAX_BONES_PER_VERTEX > weight
Definition
VVD.h:20
mdlpp::VVD::BoneWeight::bones
std::vector< int8_t > bones
Definition
VVD.h:24
mdlpp::VVD::Fixup
Definition
VVD.h:12
mdlpp::VVD::Fixup::vertexCount
int32_t vertexCount
Definition
VVD.h:15
mdlpp::VVD::Fixup::LOD
int32_t LOD
Definition
VVD.h:13
mdlpp::VVD::Fixup::sourceVertexID
int32_t sourceVertexID
Definition
VVD.h:14
mdlpp::VVD::VVD
Definition
VVD.h:37
mdlpp::VVD::VVD::numVerticesInLOD
std::array< int32_t, MAX_LOD_COUNT > numVerticesInLOD
Definition
VVD.h:46
mdlpp::VVD::VVD::numLODs
int32_t numLODs
Definition
VVD.h:44
mdlpp::VVD::VVD::fixups
std::vector< Fixup > fixups
Definition
VVD.h:50
mdlpp::VVD::VVD::open
bool open(const std::byte *data, std::size_t size, const MDL::MDL &mdl)
Definition
VVD.cpp:11
mdlpp::VVD::VVD::version
int32_t version
Definition
VVD.h:41
mdlpp::VVD::VVD::vertices
std::vector< Vertex > vertices
Definition
VVD.h:53
mdlpp::VVD::Vertex
Definition
VVD.h:27
mdlpp::VVD::Vertex::normal
sourcepp::math::Vec3f normal
Definition
VVD.h:31
mdlpp::VVD::Vertex::tangent
sourcepp::math::Vec4f tangent
Definition
VVD.h:34
mdlpp::VVD::Vertex::position
sourcepp::math::Vec3f position
Definition
VVD.h:30
mdlpp::VVD::Vertex::boneWeight
BoneWeight boneWeight
Definition
VVD.h:28
mdlpp::VVD::Vertex::uv
sourcepp::math::Vec2f uv
Definition
VVD.h:32
include
mdlpp
structs
VVD.h
Generated on
for SourcePP by
1.17.0