diff options
Diffstat (limited to 'libdimension/dimension')
-rw-r--r-- | libdimension/dimension/finishes.h | 11 | ||||
-rw-r--r-- | libdimension/dimension/texture.h | 6 |
2 files changed, 11 insertions, 6 deletions
diff --git a/libdimension/dimension/finishes.h b/libdimension/dimension/finishes.h index e3d0597..b836e51 100644 --- a/libdimension/dimension/finishes.h +++ b/libdimension/dimension/finishes.h @@ -25,8 +25,13 @@ #ifndef DIMENSION_FINISHES_H #define DIMENSION_FINISHES_H -/* A phong finish */ -dmnsn_finish *dmnsn_new_phong_finish(double diffuse, double specular, - double exp); +/* Add two finishes */ +dmnsn_finish *dmnsn_new_finish_combination(dmnsn_finish *f1, dmnsn_finish *f2); + +dmnsn_finish *dmnsn_new_ambient_finish(dmnsn_color ambient); +dmnsn_finish *dmnsn_new_diffuse_finish(double diffuse); + +/* A phong specular highlight */ +dmnsn_finish *dmnsn_new_phong_finish(double specular, double exp); #endif /* DIMENSION_FINISHES_H */ diff --git a/libdimension/dimension/texture.h b/libdimension/dimension/texture.h index e5a1bfd..c5f4b3f 100644 --- a/libdimension/dimension/texture.h +++ b/libdimension/dimension/texture.h @@ -61,14 +61,14 @@ typedef dmnsn_color dmnsn_finish_fn(const dmnsn_finish *finish, dmnsn_color light, dmnsn_color color, dmnsn_vector ray, dmnsn_vector normal, dmnsn_vector viewer); +typedef dmnsn_color dmnsn_ambient_fn(const dmnsn_finish *finish, + dmnsn_color pigment); /* dmnsn_finish definition */ struct dmnsn_finish { - /* Ambient contribution factor */ - double ambient; - /* Callbacks */ dmnsn_finish_fn *finish_fn; + dmnsn_ambient_fn *ambient_fn; dmnsn_free_fn *free_fn; /* Generic pointer */ |