summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-08-12 11:27:22 -0600
committerTavian Barnes <tavianator@gmail.com>2011-08-12 11:27:22 -0600
commit35ffff5eac99d198c49933901d2bd0dddd520a74 (patch)
tree347fc70bb8ed224956226b3cee0c4cc61f7919bc
parent7742c81f3cbfa01f5e81ae6f5fe2c8edf754edb4 (diff)
downloaddimension-35ffff5eac99d198c49933901d2bd0dddd520a74.tar.xz
Rename "translucency" to "transparency".
Perhaps I should look up terms before I use them.
-rw-r--r--libdimension-python/dimension.pxd2
-rw-r--r--libdimension-python/dimension.pyx4
-rw-r--r--libdimension/color.c4
-rw-r--r--libdimension/dimension/color.h4
-rw-r--r--libdimension/dimension/scene.h2
-rw-r--r--libdimension/raytrace.c14
6 files changed, 15 insertions, 15 deletions
diff --git a/libdimension-python/dimension.pxd b/libdimension-python/dimension.pxd
index e1bcc1e..5523cc0 100644
--- a/libdimension-python/dimension.pxd
+++ b/libdimension-python/dimension.pxd
@@ -366,7 +366,7 @@ cdef extern from "../libdimension/dimension.h":
DMNSN_RENDER_PIGMENT
DMNSN_RENDER_LIGHTS
DMNSN_RENDER_FINISH
- DMNSN_RENDER_TRANSLUCENCY
+ DMNSN_RENDER_TRANSPARENCY
DMNSN_RENDER_REFLECTION
DMNSN_RENDER_FULL
diff --git a/libdimension-python/dimension.pyx b/libdimension-python/dimension.pyx
index 4485bfe..c219f74 100644
--- a/libdimension-python/dimension.pyx
+++ b/libdimension-python/dimension.pyx
@@ -1487,7 +1487,7 @@ def _quality_to_string(int quality):
s += 'l'
if quality & DMNSN_RENDER_FINISH:
s += 'f'
- if quality & DMNSN_RENDER_TRANSLUCENCY:
+ if quality & DMNSN_RENDER_TRANSPARENCY:
s += 't'
if quality & DMNSN_RENDER_REFLECTION:
s += 'r'
@@ -1520,7 +1520,7 @@ def _string_to_quality(str quality not None):
elif ch == 'f':
flag = DMNSN_RENDER_FINISH
elif ch == 't':
- flag = DMNSN_RENDER_TRANSLUCENCY
+ flag = DMNSN_RENDER_TRANSPARENCY
elif ch == 'r':
flag = DMNSN_RENDER_REFLECTION
else:
diff --git a/libdimension/color.c b/libdimension/color.c
index eea005b..02ecff9 100644
--- a/libdimension/color.c
+++ b/libdimension/color.c
@@ -263,7 +263,7 @@ dmnsn_filter_light(dmnsn_color light, dmnsn_color filter)
/* Adds the background contribution, `filtered', to `filter' */
dmnsn_color
-dmnsn_apply_translucency(dmnsn_color filtered, dmnsn_color filter)
+dmnsn_apply_transparency(dmnsn_color filtered, dmnsn_color filter)
{
dmnsn_color ret = dmnsn_color_add(
dmnsn_color_mul(1.0 - filter.trans, filter),
@@ -278,7 +278,7 @@ dmnsn_apply_translucency(dmnsn_color filtered, dmnsn_color filter)
dmnsn_color
dmnsn_apply_filter(dmnsn_color color, dmnsn_color filter)
{
- return dmnsn_apply_translucency(dmnsn_filter_light(color, filter), filter);
+ return dmnsn_apply_transparency(dmnsn_filter_light(color, filter), filter);
}
/* Remove the filter channel */
diff --git a/libdimension/dimension/color.h b/libdimension/dimension/color.h
index d4e0402..b135c70 100644
--- a/libdimension/dimension/color.h
+++ b/libdimension/dimension/color.h
@@ -31,7 +31,7 @@ typedef struct {
double G; /**< sRGB green value. */
double B; /**< sRGB blue value. */
- double trans; /**< Translucency. */
+ double trans; /**< Transparency. */
double filter; /**< Degree of filtering. */
} dmnsn_color;
@@ -92,7 +92,7 @@ dmnsn_color dmnsn_color_gradient(dmnsn_color c1, dmnsn_color c2, double n);
/** Filter \p light through \p filter. */
dmnsn_color dmnsn_filter_light(dmnsn_color light, dmnsn_color filter);
/** Add the background contribution \p filtered to \p filter. */
-dmnsn_color dmnsn_apply_translucency(dmnsn_color filtered, dmnsn_color filter);
+dmnsn_color dmnsn_apply_transparency(dmnsn_color filtered, dmnsn_color filter);
/** Add the background contribution of \p color to \p filter. */
dmnsn_color dmnsn_apply_filter(dmnsn_color color, dmnsn_color filter);
/** Convert the color into a close equivalent with only transmittance. */
diff --git a/libdimension/dimension/scene.h b/libdimension/dimension/scene.h
index 41e2360..2f659e9 100644
--- a/libdimension/dimension/scene.h
+++ b/libdimension/dimension/scene.h
@@ -29,7 +29,7 @@ enum {
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_TRANSPARENCY = 1 << 3, /**< Render transparency/refraction. */
DMNSN_RENDER_REFLECTION = 1 << 4, /**< Render specular reflection. */
DMNSN_RENDER_FULL = ~DMNSN_RENDER_NONE /**< Render everything. */
};
diff --git a/libdimension/raytrace.c b/libdimension/raytrace.c
index cb5c8b6..ddd6e09 100644
--- a/libdimension/raytrace.c
+++ b/libdimension/raytrace.c
@@ -266,7 +266,7 @@ dmnsn_raytrace_light_ray(dmnsn_raytrace_state *state,
dmnsn_initialize_raytrace_state(&shadow_state, &shadow_caster);
dmnsn_raytrace_pigment(&shadow_state);
- if ((state->scene->quality & DMNSN_RENDER_TRANSLUCENCY)
+ if ((state->scene->quality & DMNSN_RENDER_TRANSPARENCY)
&& shadow_state.pigment.trans >= dmnsn_epsilon)
{
color = dmnsn_filter_light(color, shadow_state.pigment);
@@ -360,9 +360,9 @@ dmnsn_raytrace_reflection(const dmnsn_raytrace_state *state)
return reflected;
}
-/** Handle translucency - must be called last to work correctly. */
+/** Handle transparency - must be called last to work correctly. */
static void
-dmnsn_raytrace_translucency(dmnsn_raytrace_state *state)
+dmnsn_raytrace_transparency(dmnsn_raytrace_state *state)
{
if (state->pigment.trans >= dmnsn_epsilon) {
dmnsn_line trans_ray = dmnsn_new_line(state->r, state->intersection->ray.n);
@@ -412,7 +412,7 @@ dmnsn_raytrace_translucency(dmnsn_raytrace_state *state)
dmnsn_color filtered = dmnsn_filter_light(rec, state->pigment);
state->diffuse.filter = state->pigment.filter;
state->diffuse.trans = state->pigment.trans;
- state->diffuse = dmnsn_apply_translucency(filtered, state->diffuse);
+ state->diffuse = dmnsn_apply_transparency(filtered, state->diffuse);
}
}
@@ -452,9 +452,9 @@ dmnsn_raytrace_shoot(dmnsn_raytrace_state *state, dmnsn_line ray)
);
}
- /* Translucency */
- if (state->scene->quality & DMNSN_RENDER_TRANSLUCENCY) {
- dmnsn_raytrace_translucency(state);
+ /* Transparency */
+ if (state->scene->quality & DMNSN_RENDER_TRANSPARENCY) {
+ dmnsn_raytrace_transparency(state);
}
color = dmnsn_color_add(state->diffuse, state->additional);