From 7acd8ea6673b7a90ed4041408ccf1b024b8a007a Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 12 Jun 2011 02:37:51 -0600 Subject: Vast libdimension API and internals improvements. Couldn't really do these while I was trying to be POV-Ray compatible, 'cause they would've broken compatibility. --- libdimension/dimension/scene.h | 44 +++++++++--------------------------------- 1 file changed, 9 insertions(+), 35 deletions(-) (limited to 'libdimension/dimension/scene.h') diff --git a/libdimension/dimension/scene.h b/libdimension/dimension/scene.h index bb47ee9..969fa45 100644 --- a/libdimension/dimension/scene.h +++ b/libdimension/dimension/scene.h @@ -40,13 +40,10 @@ typedef unsigned int dmnsn_quality; /** An entire scene. */ typedef struct dmnsn_scene { /* World attributes */ - dmnsn_color background; /**< Background color. */ - dmnsn_color ambient; /**< Global ambient color. */ - dmnsn_sky_sphere *sky_sphere; /**< Sky sphere. */ - dmnsn_texture *default_texture; /**< Default object texture. */ - - /** Camera. */ - dmnsn_camera *camera; + dmnsn_color background; /**< Background color. */ + dmnsn_sky_sphere *sky_sphere; /**< Sky sphere. */ + dmnsn_texture *default_texture; /**< Default object texture. */ + dmnsn_interior *default_interior; /**< Default object interior. */ /** Canvas. */ dmnsn_canvas *canvas; @@ -57,6 +54,9 @@ typedef struct dmnsn_scene { /** Lights. */ dmnsn_array *lights; + /** Camera. */ + dmnsn_camera *camera; + /** Render quality. */ dmnsn_quality quality; @@ -72,6 +72,8 @@ typedef struct dmnsn_scene { /** Timers. */ dmnsn_timer *bounding_timer; dmnsn_timer *render_timer; + + bool initialized; /**< @internal Whether the scene is initialized. */ } dmnsn_scene; /** @@ -91,31 +93,3 @@ void dmnsn_delete_scene(dmnsn_scene *scene); * @param[in,out] scene The scene to initalize. */ void dmnsn_initialize_scene(dmnsn_scene *scene); - -/** - * Set the output canvas for a scene. - * @param[in,out] scene The scene for which to set the canvas. - * @param[in] canvas The canvas to set. - */ -void dmnsn_scene_set_canvas(dmnsn_scene *scene, dmnsn_canvas *canvas); - -/** - * Add a light to a scene. - * @param[in,out] scene The scene to which to add the light. - * @param[in] object The object to light. - */ -void dmnsn_scene_add_light(dmnsn_scene *scene, dmnsn_light *light); - -/** - * Set the camera for a scene. - * @param[in,out] scene The scene for which to set the canvas. - * @param[in] camera The camera to set. - */ -void dmnsn_scene_set_camera(dmnsn_scene *scene, dmnsn_camera *camera); - -/** - * Add an object to a scene. - * @param[in,out] scene The scene to which to add the object. - * @param[in] object The object to add. - */ -void dmnsn_scene_add_object(dmnsn_scene *scene, dmnsn_object *object); -- cgit v1.2.3