summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2014-05-26 16:20:25 -0400
committerTavian Barnes <tavianator@tavianator.com>2014-05-26 16:20:25 -0400
commit036123cc8bb3f1b0ef96f6bd15f0c4d0eefe571e (patch)
tree3164d211a742e8a3ea9af5183512fbafbe66bc0c /libdimension/dimension
parentdd8af3177f861c484317f312fa9d64ecb3cd0921 (diff)
downloaddimension-036123cc8bb3f1b0ef96f6bd15f0c4d0eefe571e.tar.xz
camera: Kill the ->ptr field.
Diffstat (limited to 'libdimension/dimension')
-rw-r--r--libdimension/dimension/camera.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/libdimension/dimension/camera.h b/libdimension/dimension/camera.h
index 00f0ad5..d8e0bdf 100644
--- a/libdimension/dimension/camera.h
+++ b/libdimension/dimension/camera.h
@@ -1,5 +1,5 @@
/*************************************************************************
- * Copyright (C) 2009-2011 Tavian Barnes <tavianator@tavianator.com> *
+ * Copyright (C) 2009-2014 Tavian Barnes <tavianator@tavianator.com> *
* *
* This file is part of The Dimension Library. *
* *
@@ -36,16 +36,20 @@ typedef struct dmnsn_camera dmnsn_camera;
typedef dmnsn_line dmnsn_camera_ray_fn(const dmnsn_camera *camera,
double x, double y);
+/**
+ * Camera destruction callback.
+ * @param[in,out] camera The camera to delete.
+ */
+typedef void dmnsn_camera_free_fn(dmnsn_camera *camera);
+
/** A camera. */
struct dmnsn_camera {
/* Callback functions */
- dmnsn_camera_ray_fn *ray_fn; /**< Camera ray callback. */
- dmnsn_free_fn *free_fn; /**< Destructor callback. */
+ dmnsn_camera_ray_fn *ray_fn; /**< Camera ray callback. */
+ dmnsn_camera_free_fn *free_fn; /**< Destructor callback. */
dmnsn_matrix trans; /**< Transformation matrix. */
- void *ptr; /**< Generic pointer for camera info. */
-
DMNSN_REFCOUNT; /**< Reference count. */
};
@@ -56,6 +60,12 @@ struct dmnsn_camera {
dmnsn_camera *dmnsn_new_camera(void);
/**
+ * Initialize a dmnsn_camera field.
+ * @param[in,out] camera The camera to initialize.
+ */
+void dmnsn_init_camera(dmnsn_camera *camera);
+
+/**
* Delete a camera.
* @param[in,out] camera The camera to delete.
*/