summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2014-06-07 15:43:19 -0400
committerTavian Barnes <tavianator@tavianator.com>2014-06-07 15:44:11 -0400
commit6c95702123269a674f0ffa0b57ec756bc611c643 (patch)
tree271a4a4e7e3912899bb31d62764f3d2fb9975729 /libdimension/dimension
parenta79085ab984979dbf4f78545f7592c8b47e4a794 (diff)
downloaddimension-6c95702123269a674f0ffa0b57ec756bc611c643.tar.xz
objects: Implement triangle fans.
Diffstat (limited to 'libdimension/dimension')
-rw-r--r--libdimension/dimension/objects.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/libdimension/dimension/objects.h b/libdimension/dimension/objects.h
index b5d3bd7..b328025 100644
--- a/libdimension/dimension/objects.h
+++ b/libdimension/dimension/objects.h
@@ -26,9 +26,10 @@
#include <stdbool.h>
/**
- * A flat triangle, without normal interpolation.
+ * A flat triangle.
* @param[in] pool The memory pool to allocate from.
* @param[in] vertices The corners of the triangle.
+ * @return A triangle.
*/
dmnsn_object *dmnsn_new_triangle(dmnsn_pool *pool, dmnsn_vector vertices[3]);
@@ -37,10 +38,21 @@ dmnsn_object *dmnsn_new_triangle(dmnsn_pool *pool, dmnsn_vector vertices[3]);
* @param[in] pool The memory pool to allocate from.
* @param[in] vertices The corners of the triangle.
* @param[in] normals The normals at each corner.
+ * @return A smooth triangle.
*/
dmnsn_object *dmnsn_new_smooth_triangle(dmnsn_pool *pool, dmnsn_vector vertices[3], dmnsn_vector normals[3]);
/**
+ * A triangle fan.
+ * @param[in] pool The memory pool to allocate from.
+ * @param[in] vertices The vertices of the fan, starting in the center.
+ * @param[in] nvertices The number of vertices.
+ * @return A triangle fan.
+ */
+dmnsn_object *
+dmnsn_new_triangle_fan(dmnsn_pool *pool, dmnsn_vector vertices[], size_t nvertices);
+
+/**
* A plane.
* @param[in] pool The memory pool to allocate from.
* @param[in] normal The normal vector of the plane.