Claude Chappe' Curse - A C Game
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
5
struct
Input
;
6
struct
Window
;
7
struct
Node
;
8
22
typedef
struct
CollectedNode
{
23
struct
Node
*
node
;
24
float
distance
;
25
vec3
impactPoint
;
26
}
CollectedNode
;
27
37
typedef
struct
Area
{
38
struct
Node
**
collisionsShapes
;
39
u8
length
;
40
struct
CollectedNode
*
collectedNodes
;
41
u32
collectedLength
;
42
u16
signal_id
;
43
}
Area
;
44
60
void
apply_body_collision
(
struct
Node
*shapeA,
struct
Node
*shapeB, vec3 collisionNormal, vec3 angularNormal,
float
penetrationDepth);
61
67
void
check_collisions
(
struct
Node
*shape);
68
80
void
update_script
(
struct
Node
*
node
, vec3 pos, vec3 rot, vec3 scale,
float
delta,
struct
Input
*
input
,
struct
Window
*
window
);
81
95
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);
96
105
void
update_global_position
(
struct
Node
*
node
, vec3 pos, vec3 rot, vec3 scale);
106
// end of Physics group
u16
#define u16
Alias for uint16_t (unsigned 16-bit integer).
Definition
aliases.h:13
u32
#define u32
Alias for uint32_t (unsigned 32-bit integer).
Definition
aliases.h:19
u8
#define u8
Alias for uint8_t (unsigned 8-bit integer).
Definition
aliases.h:7
Area
Represents an area with collision shapes and nodes.
Definition
area.class.c:34
Area::signal_id
u16 signal_id
Definition
physics.h:42
Area::collectedLength
u32 collectedLength
Definition
physics.h:41
Area::collisionsShapes
struct Node ** collisionsShapes
Definition
physics.h:38
Area::collectedNodes
struct CollectedNode * collectedNodes
Definition
physics.h:40
Area::length
u8 length
Definition
physics.h:39
Node
Represents a node in the tree structure.
Definition
node.class.c:26
LIGHTS_COUNT
@ LIGHTS_COUNT
Definition
lighting.h:90
update_script
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.
apply_body_collision
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
update_global_position
void update_global_position(struct Node *node, vec3 pos, vec3 rot, vec3 scale)
Update the global position of a node.
update_physics
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
check_collisions
void check_collisions(struct Node *shape)
Check collisions for a shape.
Definition
physics.c:125
input.h
lighting.h
window
Window window
Definition
raptiquax.c:53
input
Input input
Definition
raptiquax.c:33
CollectedNode
Represents a node collected by an area.
Definition
physics.h:22
CollectedNode::node
struct Node * node
Definition
physics.h:23
CollectedNode::distance
float distance
Definition
physics.h:24
CollectedNode::impactPoint
vec3 impactPoint
Definition
physics.h:25
Input
Structure to store input state.
Definition
input.h:93
Window
Structure representing the SDL window and its associated OpenGL context.
Definition
window.h:51
Generated by
1.9.8