Claude Chappe' Curse - A C Game
Logo Institut d'Informatique Claude Chappe Logo Université de Le Mans Logo Raeptor Production
 
Loading...
Searching...
No Matches
physics.h
Go to the documentation of this file.
1#pragma once
2#include <io/input.h>
3#include <render/lighting.h>
4
5struct Input;
6struct Window;
7struct Node;
8
22typedef struct CollectedNode {
23 struct Node *node;
24 float distance;
27
37typedef struct Area {
43} Area;
44
60void apply_body_collision(struct Node *shapeA, struct Node *shapeB, vec3 collisionNormal, vec3 angularNormal, float penetrationDepth);
61
67void check_collisions(struct Node *shape);
68
80void update_script(struct Node *node, vec3 pos, vec3 rot, vec3 scale, float delta, struct Input *input, struct Window *window);
81
95void update_physics(struct Node *node, vec3 pos, vec3 rot, vec3 scale, float delta, struct Input *input, struct Window *window, u8 lightsCount[LIGHTS_COUNT], bool active);
96
105void update_global_position(struct Node *node, vec3 pos, vec3 rot, vec3 scale);
106
// end of Physics group
#define u16
Alias for uint16_t (unsigned 16-bit integer).
Definition aliases.h:13
#define u32
Alias for uint32_t (unsigned 32-bit integer).
Definition aliases.h:19
#define u8
Alias for uint8_t (unsigned 8-bit integer).
Definition aliases.h:7
Represents an area with collision shapes and nodes.
Definition area.class.c:34
u16 signal_id
Definition physics.h:42
u32 collectedLength
Definition physics.h:41
struct Node ** collisionsShapes
Definition physics.h:38
struct CollectedNode * collectedNodes
Definition physics.h:40
u8 length
Definition physics.h:39
Represents a node in the tree structure.
Definition node.class.c:26
@ LIGHTS_COUNT
Definition lighting.h:90
void update_script(struct Node *node, vec3 pos, vec3 rot, vec3 scale, float delta, struct Input *input, struct Window *window)
Update the script for a node.
void apply_body_collision(struct Node *shapeA, struct Node *shapeB, vec3 collisionNormal, vec3 angularNormal, float penetrationDepth)
Apply body collision between two shapes.
Definition physics.c:19
void update_global_position(struct Node *node, vec3 pos, vec3 rot, vec3 scale)
Update the global position of a node.
void update_physics(struct Node *node, vec3 pos, vec3 rot, vec3 scale, float delta, struct Input *input, struct Window *window, u8 lightsCount[LIGHTS_COUNT], bool active)
Update the physics for a node.
Definition physics.c:210
void check_collisions(struct Node *shape)
Check collisions for a shape.
Definition physics.c:125
Window window
Definition raptiquax.c:53
Input input
Definition raptiquax.c:33
Represents a node collected by an area.
Definition physics.h:22
struct Node * node
Definition physics.h:23
float distance
Definition physics.h:24
vec3 impactPoint
Definition physics.h:25
Structure to store input state.
Definition input.h:93
Structure representing the SDL window and its associated OpenGL context.
Definition window.h:51