X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=laserbrain_demo;a=blobdiff_plain;f=src%2Fexhibit.h;h=63b289837ee707968e3517a910cf256337ab8f95;hp=c607fdb0a0588bf44bcb0f0efdc12bae436b94ff;hb=c790c297ef925b7f2257ad41e2123cf86305822c;hpb=b7c92831285013b2a0783bccaf3d900545ebb5ba diff --git a/src/exhibit.h b/src/exhibit.h index c607fdb..63b2898 100644 --- a/src/exhibit.h +++ b/src/exhibit.h @@ -5,25 +5,55 @@ #include "object.h" #include "geom.h" -/* +class Exhibit; +class ExhibitPriv; +class Scene; + +enum { + EXSEL_RAY = 1, + EXSEL_SPHERE = 2 +}; + +class ExSelection { +public: + Exhibit *ex; + void *obj; + void *data; + Ray selray; + Sphere selsphere; + unsigned int validmask; + + ExSelection(Exhibit *ex = 0); + + operator bool() const; +}; + +/* TODO - select me aktina kai select me sfaira, epistrefei Selection - hover me aktina kai hover me sfaira - move me selection, origin, direction kai rotation (?) */ - class Exhibit : public Object { +private: + ExhibitPriv *priv; + public: Exhibit(); - virtual ~Exhibit() = default; + virtual ~Exhibit(); Exhibit(const Exhibit&) = delete; Exhibit &operator =(const Exhibit &) = delete; - virtual void *select(const Ray &ray) const; - virtual void *select(const Sphere &sph) const; + virtual void set_node(SceneNode *node); + + virtual ExSelection select(const Ray &ray) const; + virtual ExSelection select(const Sphere &sph) const; virtual void update(float dt = 0.0f); + + virtual void pre_draw() const; virtual void draw() const; + virtual void post_draw() const; }; #endif // EXHIBIT_H_