2013-09-07 16:09:19 -07:00
|
|
|
/* object.h
|
|
|
|
*
|
|
|
|
* Declaration of scene Objects.
|
|
|
|
*
|
|
|
|
* Eryn Wells <eryn@erynwells.me>
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __OBJECT_H
|
|
|
|
#define __OBJECT_H
|
|
|
|
|
2013-09-07 16:48:50 -07:00
|
|
|
#include "basics.h"
|
|
|
|
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
ObjectTypeSphere = 1,
|
|
|
|
} ObjectType;
|
2013-09-07 16:09:19 -07:00
|
|
|
|
|
|
|
typedef struct _Object Object;
|
|
|
|
|
|
|
|
|
2013-09-07 16:48:50 -07:00
|
|
|
Object *object_init(ObjectType type);
|
|
|
|
void object_destroy(Object *obj);
|
|
|
|
|
|
|
|
Vector3 object_get_location(Object *obj);
|
|
|
|
void object_set_location(Object *obj, Vector3 location);
|
|
|
|
|
2013-09-07 18:26:32 -07:00
|
|
|
int object_does_intersect(Object *obj, Ray ray, float **t);
|
|
|
|
|
2013-09-07 16:48:50 -07:00
|
|
|
// Sphere methods
|
|
|
|
float object_sphere_get_radius(Object *obj);
|
|
|
|
void object_sphere_set_radius(Object *obj, float r);
|
|
|
|
|
|
|
|
|
2013-09-07 16:09:19 -07:00
|
|
|
#endif
|