mostly migrated for c compatibility

This commit is contained in:
Daniel Ledda
2025-11-11 04:31:20 +01:00
parent 6958228da7
commit 344056744d
14 changed files with 3050 additions and 355 deletions

View File

@@ -1,7 +1,5 @@
#include <vector>
#include "glm/glm.hpp"
#include <glm/gtx/quaternion.hpp>
#include "../gfx/gfx.h"
#include "../lib/raymath.h"
enum EntityFlags {
EntityFlags_Visible=1<<0,
@@ -17,27 +15,27 @@ struct Entity {
};
struct SceneGraphNode {
glm::mat4 local;
glm::mat4 world;
glm::vec3 translation;
glm::quat rotation;
glm::vec3 scale;
std::vector<uint32> children;
Matrix local;
Matrix world;
RLVector3 translation;
Quaternion rotation;
RLVector3 scale;
list<uint32> children;
uint32 entityHandle;
uint32 parentHandle;
};
struct Scene {
uint32 sceneRoot;
std::vector<Entity> entities;
std::vector<SceneGraphNode> graphNodes;
list<Entity> entities;
list<SceneGraphNode> graphNodes;
};
uint32 createEntity(Scene *s);
uint32 createEntity(Arena *arena, Scene *s);
Entity *getEntity(Scene *s);
SceneGraphNode *getSceneGraphNode(Scene *s, int id);
uint32 createSceneGraphNode(Scene *s);
Scene createScene(Scene *s);
uint32 createSceneGraphNode(Arena *arena, Scene *s);
Scene createScene(Arena *arena);
void initGraphNode(SceneGraphNode *n);
void recalcGraphNode(SceneGraphNode *n);
void recalcSceneGraphNode(Scene *s, uint32 parentHandle);