#ifndef NODE_H #define NODE_H #include"quaternion.h" #include"vector.h" #include namespace vb01{ class Mesh; class Model; class Light; class Node{ public: Node(Vector3=Vector3::VEC_ZERO); ~Node(); void attachMesh(Mesh*); virtual void update(); void attachChild(Node*); void addLight(Light*); inline std::vector& getMeshes(){return meshes;} inline Node* getParent(){return parent;} inline Vector3 getPosition(){return pos;} inline std::vector& getDescendants(){return descendants;} inline std::vector& getChildren(){return children;} inline std::vector& getLights(){return lights;} inline Light* getLight(int i){return lights[i];} inline int getNumLights(){return lights.size();} protected: Vector3 pos; std::vector meshes; std::vector children,descendants; std::vector lights; Node *parent=nullptr; }; } #endif