From 8fe33a340b8979a73fa84f201c15519a9b5d0266 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 14 Nov 2010 21:20:43 -0500 Subject: Document libdimension with Doxygen. --- libdimension/dimension/scene.h | 56 +++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 23 deletions(-) (limited to 'libdimension/dimension/scene.h') diff --git a/libdimension/dimension/scene.h b/libdimension/dimension/scene.h index 7e52859..36fe74e 100644 --- a/libdimension/dimension/scene.h +++ b/libdimension/dimension/scene.h @@ -18,60 +18,70 @@ * . * *************************************************************************/ -/* - * A scene. +/** + * @file + * Entire scenes. */ #ifndef DIMENSION_SCENE_H #define DIMENSION_SCENE_H -#include - +/** Render quality flags. */ enum { - DMNSN_RENDER_NONE = 0, - DMNSN_RENDER_PIGMENT = 1 << 0, - DMNSN_RENDER_LIGHTS = 1 << 1, - DMNSN_RENDER_FINISH = 1 << 2, - DMNSN_RENDER_TRANSLUCENCY = 1 << 3, - DMNSN_RENDER_REFLECTION = 1 << 4, - DMNSN_RENDER_FULL = ~DMNSN_RENDER_NONE + DMNSN_RENDER_NONE = 0, /**< Render nothing. */ + DMNSN_RENDER_PIGMENT = 1 << 0, /**< Render pigments. */ + DMNSN_RENDER_LIGHTS = 1 << 1, /**< Render lights and shadows. */ + DMNSN_RENDER_FINISH = 1 << 2, /**< Render object finishes. */ + DMNSN_RENDER_TRANSLUCENCY = 1 << 3, /**< Render translucency/refraction. */ + DMNSN_RENDER_REFLECTION = 1 << 4, /**< Render specular reflection. */ + DMNSN_RENDER_FULL = ~DMNSN_RENDER_NONE /**< Render everything. */ }; +/** Render quality. */ typedef unsigned int dmnsn_quality; -typedef struct { +/** An entire scene. */ +typedef struct dmnsn_scene { /* World attributes */ - dmnsn_color background; - dmnsn_texture *default_texture; + dmnsn_color background; /**< Background color. */ + dmnsn_texture *default_texture; /**< Default object texture. */ - /* Camera */ + /** Camera. */ dmnsn_camera *camera; - /* Canvas */ + /** Canvas. */ dmnsn_canvas *canvas; - /* Objects */ + /** Objects. */ dmnsn_array *objects; - /* Lights */ + /** Lights. */ dmnsn_array *lights; - /* Rendering quality */ + /** Render quality. */ dmnsn_quality quality; - /* Recursion limit */ + /** Recursion limit. */ unsigned int reclimit; - /* Number of parallel threads */ + /** Number of parallel threads. */ unsigned int nthreads; - /* Timers */ + /** Timers */ dmnsn_timer *bounding_timer; dmnsn_timer *render_timer; } dmnsn_scene; -/* Create a scene */ +/** + * Create a scene. + * @return A new empty scene. + */ dmnsn_scene *dmnsn_new_scene(void); + +/** + * Delete a scene. + * @param[in,out] scene The scene to delete. + */ void dmnsn_delete_scene(dmnsn_scene *scene); #endif /* DIMENSION_SCENE_H */ -- cgit v1.2.3