gravitation, no collisions
This commit is contained in:
@@ -5,12 +5,13 @@
|
||||
typedef struct {
|
||||
Vector3 pos;
|
||||
Vector3 vel;
|
||||
float r;
|
||||
double r;
|
||||
Color color;
|
||||
float restitution;
|
||||
double restitution;
|
||||
double mass;
|
||||
} object;
|
||||
|
||||
object *newobj(Vector3 pos, float r, Color c, float rest)
|
||||
object *newobj(Vector3 pos, double r, Color c, double rest, double m)
|
||||
{
|
||||
object *obj = (object*)malloc(sizeof(object));
|
||||
obj->r = r;
|
||||
@@ -18,5 +19,6 @@ object *newobj(Vector3 pos, float r, Color c, float rest)
|
||||
obj->color = c;
|
||||
obj->vel = (Vector3){0, 0, 0};
|
||||
obj->restitution = rest;
|
||||
obj->mass = m;
|
||||
return obj;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user