diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-11-17 16:06:13 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-11-17 16:06:13 -0500 |
commit | 54e1ad43c7629d85f88cefbecdfe3e60e8c42294 (patch) | |
tree | 722411e07a409b9cea18c20ee5dbcc383d2fee65 /libdimension | |
parent | 68f10691d39cd2868eea230fd646c43ac2cabb4c (diff) | |
download | dimension-54e1ad43c7629d85f88cefbecdfe3e60e8c42294.tar.xz |
Use "diffuse" instead of "specular" for diffuse finish.
Diffstat (limited to 'libdimension')
-rw-r--r-- | libdimension/dimension/finishes.h | 4 | ||||
-rw-r--r-- | libdimension/finishes.c | 8 |
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; } |