Files
Blocks3D/Instance.h
2018-05-01 19:58:58 -07:00

24 lines
548 B
C++

#include <G3DAll.h>
#pragma once
class Instance
{
public:
Instance(void);
virtual ~Instance(void);
std::string name;
virtual void render(RenderDevice*);
std::vector<Instance*> children; // All children.
std::string getClassName();
Instance* findFirstChild(std::string);
std::vector<Instance* > getChildren();
std::vector<Instance* > getAllChildren();
void setParent(Instance*);
void addChild(Instance*);
void removeChild(Instance*);
Instance* getParent();
protected:
std::string className;
Instance* parent; // Another pointer.
};