diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-06-12 02:37:51 -0600 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-06-13 00:16:06 -0600 |
commit | 7acd8ea6673b7a90ed4041408ccf1b024b8a007a (patch) | |
tree | d52199dd7c58e0217bfd1a74e7601d739ad333f5 /libdimension/dimension/object.h | |
parent | 066261810c2fca192677c5c1c01c91d6ecec65a0 (diff) | |
download | dimension-7acd8ea6673b7a90ed4041408ccf1b024b8a007a.tar.xz |
Vast libdimension API and internals improvements.
Couldn't really do these while I was trying to be POV-Ray compatible,
'cause they would've broken compatibility.
Diffstat (limited to 'libdimension/dimension/object.h')
-rw-r--r-- | libdimension/dimension/object.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/libdimension/dimension/object.h b/libdimension/dimension/object.h index 02daaba..24e1bcb 100644 --- a/libdimension/dimension/object.h +++ b/libdimension/dimension/object.h @@ -71,7 +71,7 @@ typedef bool dmnsn_object_inside_fn(const dmnsn_object *object, /** An object. */ struct dmnsn_object { - dmnsn_texture *texture; /**< Surface properties. */ + dmnsn_texture *texture; /**< Surface properties. */ dmnsn_interior *interior; /**< Interior properties. */ dmnsn_matrix trans; /**< Transformation matrix. */ @@ -79,20 +79,18 @@ struct dmnsn_object { dmnsn_bounding_box bounding_box; /**< Object bounding box. */ - /** Child objects. This array lists objects that can be split into - sub-objects for bounding purposes (for unions and meshes, for example). */ - dmnsn_array *children; + dmnsn_array *children; /**< Child objects. */ + bool split_children; /**< Whether the child objects can be split. */ dmnsn_object_initialize_fn *initialize_fn; /**< Initialization callback. */ dmnsn_object_intersection_fn *intersection_fn; /**< Intersection callback. */ dmnsn_object_inside_fn *inside_fn; /**< Inside callback. */ dmnsn_free_fn *free_fn; /**< Destruction callback. */ - /** Generic pointer for object info. */ - void *ptr; + void *ptr; /**< Generic pointer for object info. */ - /** @internal Reference count. */ - dmnsn_refcount refcount; + dmnsn_refcount refcount; /**< @internal Reference count. */ + bool initialized; /**< @internal Whether the object is initialized yet. */ }; /** @@ -113,7 +111,6 @@ void dmnsn_delete_object(dmnsn_object *object); */ void dmnsn_initialize_object(dmnsn_object *object); - /** * Transform a surface normal vector. * @param[in] trans The transformation matrix. |