diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-12-17 16:43:19 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-12-17 17:49:00 -0500 |
commit | 4dde640671a8278ff6c41ef21f03ba351828009c (patch) | |
tree | 4ab145084a16a6af07ff53d606c40464f8cabec0 /libdimension/dimension | |
parent | 65b1d1998f560c03c7cc204b0ee4f5c9c4f517e0 (diff) | |
download | dimension-4dde640671a8278ff6c41ef21f03ba351828009c.tar.xz |
Make triangles smooth.
Diffstat (limited to 'libdimension/dimension')
-rw-r--r-- | libdimension/dimension/objects.h | 22 |
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. |