summaryrefslogtreecommitdiffstats
path: root/libdimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-11-17 16:06:13 -0500
committerTavian Barnes <tavianator@gmail.com>2009-11-17 16:06:13 -0500
commit54e1ad43c7629d85f88cefbecdfe3e60e8c42294 (patch)
tree722411e07a409b9cea18c20ee5dbcc383d2fee65 /libdimension
parent68f10691d39cd2868eea230fd646c43ac2cabb4c (diff)
downloaddimension-54e1ad43c7629d85f88cefbecdfe3e60e8c42294.tar.xz
Use "diffuse" instead of "specular" for diffuse finish.
Diffstat (limited to 'libdimension')
-rw-r--r--libdimension/dimension/finishes.h4
-rw-r--r--libdimension/finishes.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/libdimension/dimension/finishes.h b/libdimension/dimension/finishes.h
index da18a6f..5f00d43 100644
--- a/libdimension/dimension/finishes.h
+++ b/libdimension/dimension/finishes.h
@@ -25,7 +25,7 @@
#ifndef DIMENSION_FINISHES_H
#define DIMENSION_FINISHES_H
-/* A specular finish */
-dmnsn_finish *dmnsn_new_specular_finish();
+/* A diffuse finish */
+dmnsn_finish *dmnsn_new_diffuse_finish();
#endif /* DIMENSION_FINISHES_H */
diff --git a/libdimension/finishes.c b/libdimension/finishes.c
index d78bc96..befe6c6 100644
--- a/libdimension/finishes.c
+++ b/libdimension/finishes.c
@@ -22,20 +22,20 @@
#include <stdlib.h> /* For malloc */
static dmnsn_color
-dmnsn_specular_finish_fn(const dmnsn_finish *finish,
+dmnsn_diffuse_finish_fn(const dmnsn_finish *finish,
dmnsn_color color, dmnsn_vector x0,
dmnsn_vector normal, dmnsn_vector reflected)
{
return dmnsn_color_mul(dmnsn_vector_dot(normal, reflected), color);
}
-/* A specular finish */
+/* A diffuse finish */
dmnsn_finish *
-dmnsn_new_specular_finish()
+dmnsn_new_diffuse_finish()
{
dmnsn_finish *finish = dmnsn_new_finish();
if (finish) {
- finish->finish_fn = &dmnsn_specular_finish_fn;
+ finish->finish_fn = &dmnsn_diffuse_finish_fn;
}
return finish;
}