From 8fe33a340b8979a73fa84f201c15519a9b5d0266 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 14 Nov 2010 21:20:43 -0500 Subject: Document libdimension with Doxygen. --- libdimension/dimension/objects.h | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) (limited to 'libdimension/dimension/objects.h') diff --git a/libdimension/dimension/objects.h b/libdimension/dimension/objects.h index 41706a0..a98541b 100644 --- a/libdimension/dimension/objects.h +++ b/libdimension/dimension/objects.h @@ -18,8 +18,9 @@ * . * *************************************************************************/ -/* - * Custom objects. +/** + * @file + * Pre-defined objects. */ #ifndef DIMENSION_OBJECTS_H @@ -27,19 +28,40 @@ #include -/* A plane through the origin, with the given normal */ +/** + * A plane. + * @param[in] normal The normal vector of the plane. + * @return A plane through the origin, with the given normal. + */ dmnsn_object *dmnsn_new_plane(dmnsn_vector normal); -/* A sphere object, of radius 1, centered at the origin. */ +/** + * A sphere. + * @return A sphere of radius 1, centered at the origin. + */ dmnsn_object *dmnsn_new_sphere(void); -/* A cube, axis-aligned, from (-1, -1, -1) to (1, 1, 1) */ +/** + * A cube. + * @return An axis-aligned cube, from (-1, -1, -1) to (1, 1, 1). + */ dmnsn_object *dmnsn_new_cube(void); -/* A cylinder/cone, from r = r1 at y = -1, to r = r2 at y = 1 */ -dmnsn_object *dmnsn_new_cylinder(double r1, double r2, bool open); +/** + * A cylinder/cone. + * @param[in] r1 The bottom radius. + * @param[in] r2 The top radius. + * @param[in] open Whether to render caps. + * @return A cone slice, from r = \p r1 at y = -1, to r = \p r2 at y = 1 + */ +dmnsn_object *dmnsn_new_cone(double r1, double r2, bool open); -/* A torus, centered at the origin and lying in the x-z plane */ +/** + * A torus. + * @param[in] major The major radius. + * @param[in] minor The minor radius. + * @return A torus, centered at the origin and lying in the x-z plane. + */ dmnsn_object *dmnsn_new_torus(double major, double minor); #endif /* DIMENSION_OBJECTS_H */ -- cgit v1.2.3