star-3d

Surface structuring for efficient 3D geometric queries
git clone git://git.meso-star.fr/star-3d.git
Log | Files | Refs | README | LICENSE

commit dc7dbb243c8373154672135a8c26a33ebb4ca4ab
parent b90b24fd66f96968a41db2bdbfd66a720eb7efa5
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 27 Jul 2016 12:24:57 +0200

Fix wrong assertions in the session implementation

Diffstat:
Msrc/s3d_session.c | 7++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/s3d_session.c b/src/s3d_session.c @@ -668,12 +668,9 @@ session_compute_scene_aabb(struct s3d_session* session) switch(geom->type) { case GEOM_MESH: mesh_compute_aabb(geom->data.mesh, lower, upper); break; case GEOM_INSTANCE: - inst = geom->data.instance; /* Note that the instance AABB was computed during its session * synchronisation. */ - ASSERT(inst->session->lower[0] < inst->session->upper[0]); - ASSERT(inst->session->lower[1] < inst->session->upper[1]); - ASSERT(inst->session->lower[2] < inst->session->upper[2]); + inst = geom->data.instance; /* Transform local scene AABB in world space */ f33_mulf3(lower, inst->transform, inst->session->lower); f33_mulf3(upper, inst->transform, inst->session->upper); @@ -695,7 +692,7 @@ session_compute_volume struct htable_geom_iterator it, end; float volume; - ASSERT(!session); + ASSERT(session); htable_geom_begin(&session->cached_geoms, &it); htable_geom_end(&session->cached_geoms, &end);