Functions and structures for physics and collision detection.
More...
|
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.
|
|
Functions and structures for physics and collision detection.
◆ 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
-
shapeA | Pointer to the first shape. |
shapeB | Pointer to the second shape. |
collisionNormal | Vector representing the collision normal. |
angularNormal | Vector representing the angular normal. |
penetrationDepth | Depth of penetration during collision. |
◆ check_collisions()
void check_collisions |
( |
struct Node * |
shape | ) |
|
Check collisions for a shape.
- Parameters
-
shape | Pointer 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
-
node | Pointer to the node. |
pos | Position vector. |
rot | Rotation vector. |
scale | Scale vector. |
delta | Time delta. |
input | Pointer to the input structure. |
window | Pointer 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
-
node | Pointer to the node. |
pos | Position vector. |
rot | Rotation vector. |
scale | Scale vector. |
delta | Time delta. |
input | Pointer to the input structure. |
window | Pointer to the window structure. |
lightsCount | Array of light counts. |
active | Boolean 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
-
node | Pointer to the node. |
pos | Position vector. |
rot | Rotation vector. |
scale | Scale vector. |