summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-02-23 14:14:04 -0500
committerTavian Barnes <tavianator@gmail.com>2010-02-23 14:14:04 -0500
commit6260a22ea7a9f08564483ea0beb76b6bdac34bb5 (patch)
tree5a7824890cd0c724c5ea6071955318c434eec77a
parent09a28f318ab5428345367aa8317960e41c822902 (diff)
downloaddimension-6260a22ea7a9f08564483ea0beb76b6bdac34bb5.tar.xz
Rename `limit' scene field to `reclimit'.
-rw-r--r--libdimension/dimension/scene.h4
-rw-r--r--libdimension/raytrace.c16
-rw-r--r--libdimension/scene.c2
3 files changed, 11 insertions, 11 deletions
diff --git a/libdimension/dimension/scene.h b/libdimension/dimension/scene.h
index 0d9dc9e..56addd0 100644
--- a/libdimension/dimension/scene.h
+++ b/libdimension/dimension/scene.h
@@ -58,9 +58,9 @@ typedef struct {
dmnsn_quality quality;
/* Recursion limit */
- unsigned int limit;
+ unsigned int reclimit;
- /* Number of paralell threads */
+ /* Number of parallel threads */
unsigned int nthreads;
} dmnsn_scene;
diff --git a/libdimension/raytrace.c b/libdimension/raytrace.c
index 4c2b84f..6721a9b 100644
--- a/libdimension/raytrace.c
+++ b/libdimension/raytrace.c
@@ -219,7 +219,7 @@ typedef struct dmnsn_raytrace_state {
const dmnsn_scene *scene;
const dmnsn_intersection *intersection;
dmnsn_bvst *bvst;
- unsigned int level;
+ unsigned int reclevel;
dmnsn_vector r;
dmnsn_vector viewer;
@@ -265,7 +265,7 @@ dmnsn_raytrace_scene_impl(dmnsn_progress *progress, dmnsn_scene *scene,
);
/* Shoot a ray */
- state.level = scene->limit;
+ state.reclevel = scene->reclimit;
color = dmnsn_raytrace_shoot(&state, ray);
}
@@ -333,8 +333,8 @@ dmnsn_raytrace_light_ray(const dmnsn_raytrace_state *state,
dmnsn_color color = (*light->light_fn)(light, state->r);
- unsigned int level = state->level;
- while (level) {
+ unsigned int reclevel = state->reclevel;
+ while (reclevel) {
dmnsn_intersection *shadow_caster
= dmnsn_bvst_search(state->bvst, shadow_ray);
@@ -345,7 +345,7 @@ dmnsn_raytrace_light_ray(const dmnsn_raytrace_state *state,
dmnsn_raytrace_state shadow_state = *state;
shadow_state.intersection = shadow_caster;
- shadow_state.level = level;
+ shadow_state.reclevel = reclevel;
dmnsn_raytrace_pigment(&shadow_state);
if (shadow_state.pigment.filter || shadow_state.pigment.trans) {
@@ -359,7 +359,7 @@ dmnsn_raytrace_light_ray(const dmnsn_raytrace_state *state,
}
dmnsn_delete_intersection(shadow_caster);
- --level;
+ --reclevel;
}
return color;
@@ -457,9 +457,9 @@ dmnsn_raytrace_translucency(dmnsn_raytrace_state *state)
static dmnsn_color
dmnsn_raytrace_shoot(dmnsn_raytrace_state *state, dmnsn_line ray)
{
- if (state->level <= 0)
+ if (state->reclevel <= 0)
return dmnsn_black;
- --state->level;
+ --state->reclevel;
dmnsn_intersection *intersection
= dmnsn_bvst_search(state->bvst, ray);
diff --git a/libdimension/scene.c b/libdimension/scene.c
index 3458948..8973005 100644
--- a/libdimension/scene.c
+++ b/libdimension/scene.c
@@ -38,7 +38,7 @@ dmnsn_new_scene()
scene->objects = dmnsn_new_array(sizeof(dmnsn_object *));
scene->lights = dmnsn_new_array(sizeof(dmnsn_light *));
scene->quality = DMNSN_RENDER_FULL;
- scene->limit = 5;
+ scene->reclimit = 5;
scene->nthreads = 0;
}
return scene;