From 6c95702123269a674f0ffa0b57ec756bc611c643 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 7 Jun 2014 15:43:19 -0400 Subject: objects: Implement triangle fans. --- libdimension/dimension/objects.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'libdimension/dimension') 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 /** - * 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,9 +38,20 @@ 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. -- cgit v1.2.3