2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-06-06 08:42:35 +00:00

feat: load xmodels from GLTF and link them, xmodel collision not working yet.

This commit is contained in:
LJW-Dev
2026-03-20 10:54:30 +08:00
committed by Jan Laupetin
parent 7a9d1fa7cb
commit 7ea2ebedbb
8 changed files with 346 additions and 129 deletions
+14 -16
View File
@@ -43,12 +43,26 @@ namespace BSP
int indexOfFirstIndex;
};
struct BSPXModel
{
std::string name;
vec3_t origin;
vec4_t rotationQuaternion;
float scale;
bool areBoundsValid;
vec3_t mins;
vec3_t maxs;
};
struct BSPWorld
{
std::vector<BSPSurface> surfaces;
std::vector<BSPVertex> vertices;
std::vector<uint16_t> indices;
std::vector<BSPMaterial> materials;
std::vector<BSPXModel> xmodels;
};
enum BSPLightType
@@ -74,21 +88,6 @@ namespace BSP
float outerConeAngle;
};
struct BSPXModel
{
std::string name;
vec3_t origin;
float scale;
vec3_t forward;
vec3_t right;
vec3_t up;
bool areBoundsValid;
vec3_t mins;
vec3_t maxs;
};
enum BSPSpawnPointType
{
SPAWNPOINT_TYPE_DEFENDER,
@@ -112,7 +111,6 @@ namespace BSP
BSPWorld colWorld;
std::vector<BSPLight> lights;
std::vector<BSPXModel> xmodels;
std::vector<BSPSpawnPoint> spawnpoints;
};