diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-02-23 14:14:04 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-02-23 14:14:04 -0500 |
commit | 6260a22ea7a9f08564483ea0beb76b6bdac34bb5 (patch) | |
tree | 5a7824890cd0c724c5ea6071955318c434eec77a /libdimension/raytrace.c | |
parent | 09a28f318ab5428345367aa8317960e41c822902 (diff) | |
download | dimension-6260a22ea7a9f08564483ea0beb76b6bdac34bb5.tar.xz |
Rename `limit' scene field to `reclimit'.
Diffstat (limited to 'libdimension/raytrace.c')
-rw-r--r-- | libdimension/raytrace.c | 16 |
1 files changed, 8 insertions, 8 deletions
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); |