#include <vector>
#include "object.h"
+#include "geom.h"
#include "gmath/gmath.h"
+class Scene;
+
class SceneNode {
private:
char *name;
Mat4 xform;
Mat4 inv_xform;
+ mutable bool bvol_valid;
+ mutable Box bvol;
+
public:
+ Scene *scene; // scene to which this node belongs
+ Mat4 dbg_xform;
+
SceneNode();
explicit SceneNode(Object *obj);
~SceneNode();
void update_node(float dt = 0.0f);
void update(float dt = 0.0f);
+ void apply_xform();
+
bool intersect(const Ray &ray, HitPoint *hit) const;
+
+ const Box &calc_bounds();
+ const Box &get_bounds() const;
};
#endif // SNODE_H_