diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2014-06-06 13:53:49 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2014-06-06 13:53:49 -0400 |
commit | c2066966bbf74062c18e8a324996bf88c769362d (patch) | |
tree | 09a0e5a68cabd352b6aae31e6a134a9cec039e94 /libdimension | |
parent | 16ac456e590e11bc2028a697c586a6c7d00fc41a (diff) | |
download | dimension-c2066966bbf74062c18e8a324996bf88c769362d.tar.xz |
object: Kill pool parameter to dmnsn_init_object().
Diffstat (limited to 'libdimension')
-rw-r--r-- | libdimension/cone.c | 4 | ||||
-rw-r--r-- | libdimension/csg.c | 2 | ||||
-rw-r--r-- | libdimension/dimension/object.h | 3 | ||||
-rw-r--r-- | libdimension/object.c | 4 | ||||
-rw-r--r-- | libdimension/plane.c | 2 | ||||
-rw-r--r-- | libdimension/torus.c | 2 | ||||
-rw-r--r-- | libdimension/triangle.c | 2 |
7 files changed, 9 insertions, 10 deletions
diff --git a/libdimension/cone.c b/libdimension/cone.c index d17b2ae..c83a260 100644 --- a/libdimension/cone.c +++ b/libdimension/cone.c @@ -130,7 +130,7 @@ dmnsn_new_cone_cap(dmnsn_pool *pool, double r) cap->r = r; dmnsn_object *object = &cap->object; - dmnsn_init_object(pool, object); + dmnsn_init_object(object); object->intersection_fn = dmnsn_cone_cap_intersection_fn; object->inside_fn = dmnsn_cone_cap_inside_fn; object->bounding_box.min = dmnsn_new_vector(-r, 0.0, -r); @@ -147,7 +147,7 @@ dmnsn_new_cone(dmnsn_pool *pool, double r1, double r2, bool open) cone->r2 = r2; dmnsn_object *object = &cone->object; - dmnsn_init_object(pool, object); + dmnsn_init_object(object); object->intersection_fn = dmnsn_cone_intersection_fn; object->inside_fn = dmnsn_cone_inside_fn; diff --git a/libdimension/csg.c b/libdimension/csg.c index 375ac2c..a8d0acc 100644 --- a/libdimension/csg.c +++ b/libdimension/csg.c @@ -81,7 +81,7 @@ dmnsn_new_csg_union(dmnsn_pool *pool, dmnsn_array *objects) csg->bvh = NULL; dmnsn_object *object = &csg->object; - dmnsn_init_object(pool, object); + dmnsn_init_object(object); object->children = objects; object->split_children = true; diff --git a/libdimension/dimension/object.h b/libdimension/dimension/object.h index 9724dec..4bb5b0e 100644 --- a/libdimension/dimension/object.h +++ b/libdimension/dimension/object.h @@ -98,10 +98,9 @@ dmnsn_object *dmnsn_new_object(dmnsn_pool *pool); /** * Initialize a dmnsn_object field. - * @param[in] pool The memory pool to allocate from. * @param[out] object The object to initialize. */ -void dmnsn_init_object(dmnsn_pool *pool, dmnsn_object *object); +void dmnsn_init_object(dmnsn_object *object); /** * Initialize an object and potentially its children. diff --git a/libdimension/object.c b/libdimension/object.c index ed87ce6..126f41a 100644 --- a/libdimension/object.c +++ b/libdimension/object.c @@ -31,13 +31,13 @@ dmnsn_object * dmnsn_new_object(dmnsn_pool *pool) { dmnsn_object *object = DMNSN_PALLOC(pool, dmnsn_object); - dmnsn_init_object(pool, object); + dmnsn_init_object(object); return object; } /* Initialize a dmnsn_object field */ void -dmnsn_init_object(dmnsn_pool *pool, dmnsn_object *object) +dmnsn_init_object(dmnsn_object *object) { object->texture = NULL; object->interior = NULL; diff --git a/libdimension/plane.c b/libdimension/plane.c index e597306..97f20b3 100644 --- a/libdimension/plane.c +++ b/libdimension/plane.c @@ -49,7 +49,7 @@ dmnsn_new_plane(dmnsn_pool *pool, dmnsn_vector normal) plane->normal = normal; dmnsn_object *object = &plane->object; - dmnsn_init_object(pool, object); + dmnsn_init_object(object); object->intersection_fn = dmnsn_plane_intersection_fn; object->inside_fn = dmnsn_plane_inside_fn; object->bounding_box = dmnsn_infinite_bounding_box(); diff --git a/libdimension/torus.c b/libdimension/torus.c index 5f2085c..5723fdb 100644 --- a/libdimension/torus.c +++ b/libdimension/torus.c @@ -149,7 +149,7 @@ dmnsn_new_torus(dmnsn_pool *pool, double major, double minor) torus->minor = minor; dmnsn_object *object = &torus->object; - dmnsn_init_object(pool, object); + dmnsn_init_object(object); object->intersection_fn = dmnsn_torus_intersection_fn; object->inside_fn = dmnsn_torus_inside_fn; diff --git a/libdimension/triangle.c b/libdimension/triangle.c index 87efacc..9db0229 100644 --- a/libdimension/triangle.c +++ b/libdimension/triangle.c @@ -131,7 +131,7 @@ dmnsn_new_smooth_triangle(dmnsn_pool *pool, dmnsn_vector vertices[3], dmnsn_vect triangle->nac = dmnsn_vector_sub(nc, na); dmnsn_object *object = &triangle->object; - dmnsn_init_object(pool, object); + dmnsn_init_object(object); object->intersection_fn = dmnsn_smooth_triangle_intersection_fn; object->inside_fn = dmnsn_triangle_inside_fn; object->bounding_box.min = dmnsn_zero; |