summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension/object.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-06-13 22:55:48 +0000
committerTavian Barnes <tavianator@gmail.com>2009-06-13 22:55:48 +0000
commit836d8f7138633517c6e503520f7be354ac32d836 (patch)
tree9e6947fdabd51dd901a1f4106e2e16c989deffef /libdimension/dimension/object.h
parent042ef96e2c004a963451edc9efa7074316a360c4 (diff)
downloaddimension-836d8f7138633517c6e503520f7be354ac32d836.tar.xz
Properly forward-declare dmnsn_object and dmnsn_camera, and take a
transformation matrix in dmnsn_new_perspective_camera().
Diffstat (limited to 'libdimension/dimension/object.h')
-rw-r--r--libdimension/dimension/object.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/libdimension/dimension/object.h b/libdimension/dimension/object.h
index b9702f4..bd660a0 100644
--- a/libdimension/dimension/object.h
+++ b/libdimension/dimension/object.h
@@ -25,19 +25,23 @@
* Objects.
*/
+/* Forward-declare dmnsn_object */
+typedef struct dmnsn_object dmnsn_object;
+
+/* Object callback types */
typedef dmnsn_array *dmnsn_object_intersections_fn(const dmnsn_object *object,
dmnsn_line line);
typedef int dmnsn_object_inside_fn(const dmnsn_object *object,
dmnsn_vector point);
-typedef struct {
+struct dmnsn_object {
/* Generic pointer for object info */
void *ptr;
/* Callback functions */
dmnsn_object_intersections_fn *intersections_fn;
dmnsn_object_inside_fn *inside_fn;
-} dmnsn_object;
+};
dmnsn_object *dmnsn_new_object();
void dmnsn_delete_object(dmnsn_object *object);