X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=laserbrain_demo;a=blobdiff_plain;f=src%2Fobject.h;fp=src%2Fobject.h;h=cc82d1ba8e2f1107e4401e29a83089b8447e1dda;hp=0000000000000000000000000000000000000000;hb=b7c92831285013b2a0783bccaf3d900545ebb5ba;hpb=a58455a92c7ecab980cbe1b7e282aeb6bfe7e889 diff --git a/src/object.h b/src/object.h new file mode 100644 index 0000000..cc82d1b --- /dev/null +++ b/src/object.h @@ -0,0 +1,37 @@ +#ifndef OBJECT_H_ +#define OBJECT_H_ + +#include +#include +#include "geom.h" +#include "material.h" + +class Object; +class SceneNode; + +enum ObjType { OBJ_NULL, OBJ_MESH }; + +class Object { +private: + std::string name; + +public: + Material mtl; + //GeomObject *bvol; + SceneNode *node; + + Object(); + virtual ~Object() = default; + + virtual ObjType get_type() const; + + virtual void set_name(const char *name); + virtual const char *get_name() const; + + virtual bool intersect(const Ray &ray, HitPoint *hit = 0) const; + + virtual void update(float dt = 0.0f); + virtual void draw() const; +}; + +#endif // OBJECT_H_