summaryrefslogtreecommitdiffstats
path: root/libdimension/cube.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-06-26 15:31:34 +0000
committerTavian Barnes <tavianator@gmail.com>2009-06-26 15:31:34 +0000
commit3ee98f3bac24fd1c70a9de3e0fbe774e762c25b3 (patch)
treeddc8d088662a88101670150c491012427c85b5bf /libdimension/cube.c
parentd56d643d412e06ff1e5239f8ebbd96f716b416bd (diff)
downloaddimension-3ee98f3bac24fd1c70a9de3e0fbe774e762c25b3.tar.xz
Add lots of comments, and some code fixes discovered in the process.
Diffstat (limited to 'libdimension/cube.c')
-rw-r--r--libdimension/cube.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libdimension/cube.c b/libdimension/cube.c
index 197a0f8..bb71d0b 100644
--- a/libdimension/cube.c
+++ b/libdimension/cube.c
@@ -27,6 +27,7 @@ static dmnsn_array *dmnsn_cube_intersections_fn(const dmnsn_object *cube,
static int dmnsn_cube_inside_fn(const dmnsn_object *cube,
dmnsn_vector point);
+/* Allocate a new cube object */
dmnsn_object *
dmnsn_new_cube()
{
@@ -38,12 +39,14 @@ dmnsn_new_cube()
return cube;
}
+/* Delete a cube */
void
dmnsn_delete_cube(dmnsn_object *cube)
{
dmnsn_delete_object(cube);
}
+/* Intersections callback for a cube */
static dmnsn_array *
dmnsn_cube_intersections_fn(const dmnsn_object *cube, dmnsn_line line)
{
@@ -104,6 +107,7 @@ dmnsn_cube_intersections_fn(const dmnsn_object *cube, dmnsn_line line)
return array;
}
+/* Inside callback for a cube */
static int
dmnsn_cube_inside_fn(const dmnsn_object *cube, dmnsn_vector point)
{