summaryrefslogtreecommitdiffstats
path: root/libdimensionxx/scene.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libdimensionxx/scene.cpp')
-rw-r--r--libdimensionxx/scene.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/libdimensionxx/scene.cpp b/libdimensionxx/scene.cpp
index f41f3b5..5695c1b 100644
--- a/libdimensionxx/scene.cpp
+++ b/libdimensionxx/scene.cpp
@@ -23,7 +23,7 @@
namespace Dimension
{
// Allocate a dmnsn_scene
- Scene::Scene(const Color& background, Camera& camera, Canvas& canvas)
+ Scene::Scene(Camera& camera, Canvas& canvas)
: m_scene(new dmnsn_scene*(dmnsn_new_scene())), m_camera(camera.copy()),
m_canvas(new Canvas(canvas)), m_objects(dmnsn()->objects)
{
@@ -31,9 +31,10 @@ namespace Dimension
throw Dimension_Error("Couldn't allocate scene.");
}
- dmnsn()->background = background.dmnsn();
+ dmnsn()->background = Color(sRGB(0.0, 0.0, 0.0)).dmnsn();
dmnsn()->camera = this->camera().dmnsn();
dmnsn()->canvas = this->canvas().dmnsn();
+ dmnsn()->quality = static_cast<dmnsn_quality>(RENDER_FULL);
}
// Delete the scene
@@ -53,6 +54,12 @@ namespace Dimension
return Color(dmnsn()->background);
}
+ void
+ Scene::background(const Color& color)
+ {
+ dmnsn()->background = color.dmnsn();
+ }
+
Camera&
Scene::camera()
{
@@ -89,6 +96,18 @@ namespace Dimension
return m_objects;
}
+ Quality
+ Scene::quality() const
+ {
+ return static_cast<Quality>(dmnsn()->quality);
+ }
+
+ void
+ Scene::quality(Quality quality)
+ {
+ dmnsn()->quality = static_cast<dmnsn_quality>(quality);
+ }
+
// Access the wrapped C object.
dmnsn_scene*