summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension/objects.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-12-17 16:43:19 -0500
committerTavian Barnes <tavianator@gmail.com>2011-12-17 17:49:00 -0500
commit4dde640671a8278ff6c41ef21f03ba351828009c (patch)
tree4ab145084a16a6af07ff53d606c40464f8cabec0 /libdimension/dimension/objects.h
parent65b1d1998f560c03c7cc204b0ee4f5c9c4f517e0 (diff)
downloaddimension-4dde640671a8278ff6c41ef21f03ba351828009c.tar.xz
Make triangles smooth.
Diffstat (limited to 'libdimension/dimension/objects.h')
-rw-r--r--libdimension/dimension/objects.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/libdimension/dimension/objects.h b/libdimension/dimension/objects.h
index 001cb3d..9ce9e46 100644
--- a/libdimension/dimension/objects.h
+++ b/libdimension/dimension/objects.h
@@ -26,14 +26,28 @@
#include <stdbool.h>
/**
- * A triangle.
+ * A triangle, with normals interpolated between the points.
+ * @param[in] a The first corner of the triangle.
+ * @param[in] b The second corner of the triangle.
+ * @param[in] c The third corner of the triangle.
+ * @param[in] na The normal at \p a.
+ * @param[in] nb The normal at \p b.
+ * @param[in] nc The normal at \p c.
+ */
+dmnsn_object *dmnsn_new_triangle(
+ dmnsn_vector a, dmnsn_vector b, dmnsn_vector c,
+ dmnsn_vector na, dmnsn_vector nb, dmnsn_vector nc
+);
+
+/**
+ * A flat triangle, without normal interpolation.
* @param[in] a The first corner of the triangle.
* @param[in] b The second corner of the triangle.
* @param[in] c The third corner of the triangle.
*/
-dmnsn_object *dmnsn_new_triangle(dmnsn_vector a,
- dmnsn_vector b,
- dmnsn_vector c);
+dmnsn_object *dmnsn_new_flat_triangle(
+ dmnsn_vector a, dmnsn_vector b, dmnsn_vector c
+);
/**
* A plane.