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

Functions and structures for physics and collision detection. More...

Classes

struct  CollectedNode
 Represents a node collected by an area. More...
 

Functions

void apply_body_collision (struct Node *shapeA, struct Node *shapeB, vec3 collisionNormal, vec3 angularNormal, float penetrationDepth)
 Apply body collision between two shapes.
 
void check_collisions (struct Node *shape)
 Check collisions for a shape.
 
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 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.
 
void update_global_position (struct Node *node, vec3 pos, vec3 rot, vec3 scale)
 Update the global position of a node.
 

Detailed Description

Functions and structures for physics and collision detection.

Function Documentation

◆ 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.

Parameters
shapeAPointer to the first shape.
shapeBPointer to the second shape.
collisionNormalVector representing the collision normal.
angularNormalVector representing the angular normal.
penetrationDepthDepth of penetration during collision.

◆ check_collisions()

void check_collisions ( struct Node shape)

Check collisions for a shape.

Parameters
shapePointer to the shape.

◆ 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.

Parameters
nodePointer to the node.
posPosition vector.
rotRotation vector.
scaleScale vector.
deltaTime delta.
inputPointer to the input structure.
windowPointer to the window structure.

◆ 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.

Parameters
nodePointer to the node.
posPosition vector.
rotRotation vector.
scaleScale vector.
deltaTime delta.
inputPointer to the input structure.
windowPointer to the window structure.
lightsCountArray of light counts.
activeBoolean indicating if the node is active.

◆ update_global_position()

void update_global_position ( struct Node node,
vec3  pos,
vec3  rot,
vec3  scale 
)

Update the global position of a node.

Parameters
nodePointer to the node.
posPosition vector.
rotRotation vector.
scaleScale vector.