Claude Chappe' Curse - A C Game
Logo Institut d'Informatique Claude Chappe Logo Université de Le Mans Logo Raeptor Production
 
Loading...
Searching...
No Matches
node.h
Go to the documentation of this file.
1#include <io/shader.h>
2#include <render/camera.h>
3#include <physics/bodies.h>
4#include <scripts/scripts.h>
6
7#ifndef NODE_H
8#define NODE_H
9
10struct PointLight;
11struct DirectionalLight;
12struct SpotLight;
13struct Camera;
14struct Frame;
15struct StaticBody;
16struct RigidBody;
17struct KinematicBody;
21struct Model;
22struct TexturedMesh;
23struct Mesh;
24struct Viewport;
25struct Filter;
26struct WorldShaders;
27struct RenderTarget;
28
29
41typedef struct Node {
42 void *object;
43 struct Node **children;
44 struct Node *parent;
49 vec3 pos;
50 vec3 rot;
51 vec3 scale;
53 vec3 globalPos;
54 vec3 globalRot;
62} Node;
63
64
81typedef struct Tree {
82 struct Node *root;
83} Tree;
84
90 NODE_ACTIVE = 1 << 0, // 0000 0001
91 NODE_VISIBLE = 1 << 1, // 0000 0010
92 NODE_SCRIPT = 1 << 2, // 0000 0100
93 NODE_LIGHT_ACTIVE = 1 << 3, // 0000 1000
94 NODE_INITIALIZED = 1 << 4, // 0001 0000
95 NODE_UNUSED4 = 1 << 5, // 0010 0000
96 NODE_UNUSED5 = 1 << 6, // 0100 0000
97 NODE_EDITOR_FLAG = 1 << 7, // 1000 0000
98};
99
100
101#define NODE_ACTIVE_AND_VISIBLE NODE_ACTIVE | NODE_VISIBLE // 0000 0011
102#define NODE_DEFAULT_FLAGS NODE_ACTIVE_AND_VISIBLE // 0000 0011
104#endif
#define u16
Alias for uint16_t (unsigned 16-bit integer).
Definition aliases.h:13
#define u8
Alias for uint8_t (unsigned 8-bit integer).
Definition aliases.h:7
A structure to represent a camera with position and rotation in 3D space.
Definition camera.class.c:29
Represents a directional light source.
Definition directional_light.class.c:28
Represents a frame.
Definition frame.class.c:29
Represents a kinematic body in the physics simulation.
Definition kinematic_body.class.c:31
Structure representing a mesh.
Definition mesh.class.c:25
Structure representing a 3D model.
Definition model.class.c:27
Represents a node in the tree structure.
Definition node.class.c:26
u8 flags
Definition node.h:47
Shader shader
Definition node.h:61
vec3 globalRot
Definition node.h:54
vec3 pos
Definition node.h:49
vec3 globalPos
Definition node.h:53
vec3 globalScale
Definition node.h:55
struct Node * parent
Definition node.h:44
struct Node ** children
Definition node.h:43
vec3 rot
Definition node.h:50
u8 type
Definition node.h:46
void * object
Definition node.h:42
u8 attributes_count
Definition node.h:59
vec3 scale
Definition node.h:51
u16 length
Definition node.h:45
BehaviorAttribute * attribute
Definition node.h:58
Behavior * behavior
Definition node.h:57
Represents a point light source.
Definition point_light.class.c:31
A structure to handle render targets.
Definition render_target.class.c:33
Represents a rigid body in the physics simulation.
Definition rigid_body.class.c:29
Represents a spotlight source.
Definition spot_light.class.c:31
Represents a static body in the physics simulation.
Definition static_body.class.c:34
Structure representing a textured mesh.
Definition textured_mesh.class.c:26
unsigned int Shader
Represents an unsigned integer used as a shader identifier.
Definition memory.h:26
struct Node * root
Definition node.h:82
NodeFlags
Flags indicating the state and properties of a node.
Definition node.h:89
@ NODE_UNUSED5
Definition node.h:96
@ NODE_LIGHT_ACTIVE
Definition node.h:93
@ NODE_VISIBLE
Definition node.h:91
@ NODE_ACTIVE
Definition node.h:90
@ NODE_UNUSED4
Definition node.h:95
@ NODE_SCRIPT
Definition node.h:92
@ NODE_EDITOR_FLAG
Definition node.h:97
@ NODE_INITIALIZED
Definition node.h:94
Header file defining macros, structures, and functions for script management in a game engine.
ScriptFunc Behavior[BEHAVIOR_SCRIPT_COUNT]
Array of script functions for different behavior scripts.
Definition scripts.h:125
Represents a box collision shape.
Definition bodies.h:79
Represents a plane collision shape.
Definition bodies.h:70
Represents a sphere collision shape.
Definition bodies.h:88
Represents a tree structure.
Definition node.h:81
A structure to hold various shaders used in the rendering process.
Definition render.h:25
Union representing different types of behavior attributes.
Definition scripts.h:87