summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-08-18 20:17:37 -0600
committerTavian Barnes <tavianator@gmail.com>2011-08-18 20:17:37 -0600
commit9c9fb9d59c2e90fc2bc9066dac514285c9479277 (patch)
treedf0d64d60cb933698054b41312167a790f5787cd /libdimension/dimension
parent6766ce89672897cabe48e48798b29dc3a461f1da (diff)
downloaddimension-9c9fb9d59c2e90fc2bc9066dac514285c9479277.tar.xz
Handle reflection of light and transmitted rays.
Diffstat (limited to 'libdimension/dimension')
-rw-r--r--libdimension/dimension/color.h4
-rw-r--r--libdimension/dimension/light.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/libdimension/dimension/color.h b/libdimension/dimension/color.h
index b135c70..6d706eb 100644
--- a/libdimension/dimension/color.h
+++ b/libdimension/dimension/color.h
@@ -84,7 +84,9 @@ dmnsn_color dmnsn_color_to_sRGB(dmnsn_color color);
/** Greyscale color intensity. */
double dmnsn_color_intensity(dmnsn_color color);
/** Add two colors together. */
-dmnsn_color dmnsn_color_add(dmnsn_color color1, dmnsn_color color2);
+dmnsn_color dmnsn_color_add(dmnsn_color lhs, dmnsn_color rhs);
+/** Subtract two colors. */
+dmnsn_color dmnsn_color_sub(dmnsn_color lhs, dmnsn_color rhs);
/** Multiply a color's intensity by \p n. */
dmnsn_color dmnsn_color_mul(double n, dmnsn_color color);
/** Return the color at \p n on a gradient from \p c1 at 0 to \p c2 at 1. */
diff --git a/libdimension/dimension/light.h b/libdimension/dimension/light.h
index b41a524..36c724a 100644
--- a/libdimension/dimension/light.h
+++ b/libdimension/dimension/light.h
@@ -34,8 +34,8 @@ typedef struct dmnsn_light dmnsn_light;
* @param[in] v The point to illuminate.
* @return The direction of light rays pointing from \p v
*/
-typedef dmnsn_line dmnsn_light_direction_fn(const dmnsn_light *light,
- dmnsn_vector v);
+typedef dmnsn_vector dmnsn_light_direction_fn(const dmnsn_light *light,
+ dmnsn_vector v);
/**
* Light illumination callback.