mirror of
https://github.com/ApfelTeeSaft/vb01.git
synced 2026-08-26 19:33:45 +00:00
3 types of lights
supported number of n lights
This commit is contained in:
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user