3 types of lights

supported number of n lights
This commit is contained in:
devZoGok
2021-10-18 19:03:19 +03:00
parent 0083f9e5b8
commit aebc069053
16 changed files with 350 additions and 23 deletions
+9 -1
View File
@@ -7,6 +7,7 @@
namespace vb01{
class Mesh;
class Light;
class Node{
public:
@@ -15,12 +16,19 @@ namespace vb01{
void setObject(Mesh*);
void update();
void attachChild(Node*);
void addLight(Light*);
inline Mesh* getMesh(){return mesh;}
inline Node* getParent(){return parent;}
inline Vector3 getPosition(){return pos;}
inline std::vector<Node*>& getDescendants(){return descendants;}
inline std::vector<Light*>& getLights(){return lights;}
inline Light* getLight(int i){return lights[i];}
inline int getNumLights(){return lights.size();}
private:
Vector3 pos;
Mesh *mesh=nullptr;
std::vector<Node*> children;
std::vector<Node*> children,descendants;
std::vector<Light*> lights;
Node *parent=nullptr;
};
}