assimp
[laserbrain_demo] / src / object.h
diff --git a/src/object.h b/src/object.h
new file mode 100644 (file)
index 0000000..cc82d1b
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef OBJECT_H_
+#define OBJECT_H_
+
+#include <string>
+#include <gmath/gmath.h>
+#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_