summaryrefslogtreecommitdiffstats
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
parent68f10691d39cd2868eea230fd646c43ac2cabb4c (diff)
downloaddimension-54e1ad43c7629d85f88cefbecdfe3e60e8c42294.tar.xz
Use "diffuse" instead of "specular" for diffuse finish.
-rw-r--r--libdimension/dimension/finishes.h4
-rw-r--r--libdimension/finishes.c8
-rw-r--r--tests/libdimension/tests.c2
3 files changed, 7 insertions, 7 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;
}
diff --git a/tests/libdimension/tests.c b/tests/libdimension/tests.c
index 5daa5be..85c43a6 100644
--- a/tests/libdimension/tests.c
+++ b/tests/libdimension/tests.c
@@ -31,7 +31,7 @@ dmnsn_new_default_scene()
}
/* Default finish */
- scene->default_texture->finish = dmnsn_new_specular_finish();
+ scene->default_texture->finish = dmnsn_new_diffuse_finish();
/* Background color */
dmnsn_sRGB sRGB = { .R = 0.0, .G = 0.0, .B = 0.1 };