X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fsnode.h;h=5af02f41fc0d99ed03f42902d40e3a169f48f44a;hb=59af92c432928d1a325393472cb8ec7a4a1594ad;hp=21cf16db0bc92691895fed17192472c310bc4ab9;hpb=b7c92831285013b2a0783bccaf3d900545ebb5ba;p=laserbrain_demo diff --git a/src/snode.h b/src/snode.h index 21cf16d..5af02f4 100644 --- a/src/snode.h +++ b/src/snode.h @@ -5,6 +5,8 @@ #include "object.h" #include "gmath/gmath.h" +class Scene; + class SceneNode { private: char *name; @@ -22,6 +24,9 @@ private: Mat4 inv_xform; public: + Scene *scene; // scene to which this node belongs + Mat4 dbg_xform; + SceneNode(); explicit SceneNode(Object *obj); ~SceneNode(); @@ -61,6 +66,8 @@ public: void update_node(float dt = 0.0f); void update(float dt = 0.0f); + void apply_xform(); + bool intersect(const Ray &ray, HitPoint *hit) const; };