solstice-solver

Solver library of the solstice app
git clone git://git.meso-star.com/solstice-solver.git
Log | Files | Refs | README | LICENSE

commit 1d6ecd2a93c83c5eb495200d1d7f14aa3e9f9ef3
parent f1cc9fdd35602972c2023c4ea69d1bcd3f5d618f
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Mon, 29 Aug 2016 18:21:49 +0200

BugFix: failed to apply transforms on instances

Stop storing transforms though.
No get_transform function available anymore.

Diffstat:
Msrc/ssol_object_instance.c | 6++++--
Msrc/ssol_object_instance_c.h | 1-
Msrc/ssol_solver.c | 7-------
3 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/src/ssol_object_instance.c b/src/ssol_object_instance.c @@ -117,11 +117,13 @@ res_T ssol_object_instance_set_transform (struct ssol_object_instance* instance, const double transform[12]) { + float t[12]; + int i; if (!instance || !transform) return RES_BAD_ARG; - /* Keep transform for later use */ - memcpy(instance->transform, transform, sizeof(instance->transform)); + for (i = 0; i < 12; i++) t[i] = (float) transform[i]; + s3d_instance_set_transform(instance->s3d_shape, t); return RES_OK; } diff --git a/src/ssol_object_instance_c.h b/src/ssol_object_instance_c.h @@ -23,7 +23,6 @@ struct ssol_object_instance { struct ssol_object* object; /* Instantiated object */ - double transform[12]; /* Object to world 3x4 column major affine transform */ struct s3d_shape* s3d_shape; /* Instantiated Star-3D shape */ struct str receiver_name; /* Empty if not a receiver */ diff --git a/src/ssol_solver.c b/src/ssol_solver.c @@ -96,13 +96,6 @@ get_3dscene(const struct ssol_object_instance* instance) return instance->object->s3d_scn; } -static const double* -get_transform(const struct ssol_object_instance* instance) -{ - ASSERT(instance); - return instance->transform; -} - /******************************************************************************* * Local functions ******************************************************************************/