Gama C Library
Gama C API Documentation
Loading...
Searching...
No Matches
gmBody Struct Reference

Structure representing a physics body with properties for collision and movement. More...

#include <body.h>

Data Fields

uint8_t is_active
uint8_t is_static
gmColliderType collider_type
gmPos position
gmPos velocity
gmPos acceleration
double width
double height
double radius
double mass
double restitution
double friction

Detailed Description

Structure representing a physics body with properties for collision and movement.

Field Documentation

◆ acceleration

gmPos gmBody::acceleration

Current acceleration of the body

◆ collider_type

gmColliderType gmBody::collider_type

Type of collider (rectangle or circle)

◆ friction

double gmBody::friction

Friction coefficient (not currently used in the code)

◆ height

double gmBody::height

◆ is_active

uint8_t gmBody::is_active

Whether the body is active in the physics simulation

◆ is_static

uint8_t gmBody::is_static

Whether the body is static (immovable)

◆ mass

double gmBody::mass

Mass of the body

◆ position

gmPos gmBody::position

Current position of the body

◆ radius

double gmBody::radius

Dimensions of the body (width/height for rectangles, radius for circles)

◆ restitution

double gmBody::restitution

Bounciness of the body (0.0 = no bounce, 1.0+ = bounce)

◆ velocity

gmPos gmBody::velocity

Current velocity of the body

◆ width

double gmBody::width

The documentation for this struct was generated from the following file: