summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension/pigment.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-06-12 02:37:51 -0600
committerTavian Barnes <tavianator@gmail.com>2011-06-13 00:16:06 -0600
commit7acd8ea6673b7a90ed4041408ccf1b024b8a007a (patch)
treed52199dd7c58e0217bfd1a74e7601d739ad333f5 /libdimension/dimension/pigment.h
parent066261810c2fca192677c5c1c01c91d6ecec65a0 (diff)
downloaddimension-7acd8ea6673b7a90ed4041408ccf1b024b8a007a.tar.xz
Vast libdimension API and internals improvements.
Couldn't really do these while I was trying to be POV-Ray compatible, 'cause they would've broken compatibility.
Diffstat (limited to 'libdimension/dimension/pigment.h')
-rw-r--r--libdimension/dimension/pigment.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libdimension/dimension/pigment.h b/libdimension/dimension/pigment.h
index 896c0bc..8b3ce4b 100644
--- a/libdimension/dimension/pigment.h
+++ b/libdimension/dimension/pigment.h
@@ -55,6 +55,9 @@ struct dmnsn_pigment {
/** Generic pointer. */
void *ptr;
+
+ dmnsn_refcount refcount; /** @internal Reference count. */
+ bool initialized; /** @internal Whether the pigment is initialized. */
};
/**
@@ -76,3 +79,12 @@ void dmnsn_delete_pigment(dmnsn_pigment *pigment);
* @param[in,out] pigment The pigment to initialize.
*/
void dmnsn_initialize_pigment(dmnsn_pigment *pigment);
+
+/**
+ * Evaluate the color of a pigment at a point.
+ * @param[in] pigment The pigment to evaluate.
+ * @param[in] v The point to color.
+ * @return The color at \p v.
+ */
+dmnsn_color dmnsn_evaluate_pigment(const dmnsn_pigment *pigment,
+ dmnsn_vector v);