Added foreground to scene.

This commit is contained in:
brunoherbelin
2020-05-22 10:31:08 +02:00
parent 16fa3300b8
commit 9f4cb4dce3
7 changed files with 42 additions and 28 deletions

View File

@@ -414,12 +414,14 @@ Scene::Scene(): root_(nullptr), foreground_(nullptr), background_(nullptr)
root_ = new Group;
background_ = new Group;
background_->translation_.z = 0;
background_->translation_.z = 0.f;
workspace_ = new Group;
workspace_->translation_.z = 1.f;
foreground_ = new Group;
// TODO Verify depth for foreground
foreground_->translation_.z = 1;
foreground_->translation_.z = SCENE_DEPTH -0.1f;
root_->attach(background_);
root_->attach(workspace_);
root_->attach(foreground_);
}
@@ -433,6 +435,7 @@ Scene::~Scene()
void Scene::clear()
{
clearForeground();
clearWorkspace();
clearBackground();
}
@@ -441,6 +444,11 @@ void Scene::clearForeground()
foreground_->clear();
}
void Scene::clearWorkspace()
{
foreground_->clear();
}
void Scene::clearBackground()
{
background_->clear();