Code for objects and spheres
This commit is contained in:
parent
b4cc32a196
commit
da3aa51f1b
2 changed files with 114 additions and 3 deletions
17
src/object.h
17
src/object.h
|
@ -9,8 +9,25 @@
|
|||
#ifndef __OBJECT_H
|
||||
#define __OBJECT_H
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
|
||||
typedef enum {
|
||||
ObjectTypeSphere = 1,
|
||||
} ObjectType;
|
||||
|
||||
typedef struct _Object Object;
|
||||
|
||||
|
||||
Object *object_init(ObjectType type);
|
||||
void object_destroy(Object *obj);
|
||||
|
||||
Vector3 object_get_location(Object *obj);
|
||||
void object_set_location(Object *obj, Vector3 location);
|
||||
|
||||
// Sphere methods
|
||||
float object_sphere_get_radius(Object *obj);
|
||||
void object_sphere_set_radius(Object *obj, float r);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue