Files
simple_physics/objects.h
2025-12-23 13:29:26 +01:00

23 lines
394 B
C

#pragma once
#include <raylib.h>
#include <stdlib.h>
typedef struct {
Vector3 pos;
Vector3 vel;
float r;
Color color;
float restitution;
} object;
object *newobj(Vector3 pos, float r, Color c, float rest)
{
object *obj = (object*)malloc(sizeof(object));
obj->r = r;
obj->pos = pos;
obj->color = c;
obj->vel = (Vector3){0, 0, 0};
obj->restitution = rest;
return obj;
}