[brlcad-commits] SF.net SVN: brlcad:[43007] brlcad/trunk/src/librt/primitives/superell/ superell.c
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <br...@us...> - 2011-02-04 06:48:18
|
Revision: 43007 http://brlcad.svn.sourceforge.net/brlcad/?rev=43007&view=rev Author: brlcad Date: 2011-02-04 06:48:12 +0000 (Fri, 04 Feb 2011) Log Message: ----------- not bloody likely there are any v4 super ellipsoids, but go ahead and fix the two parameters that weren't being serialized properly anyways Modified Paths: -------------- brlcad/trunk/src/librt/primitives/superell/superell.c Modified: brlcad/trunk/src/librt/primitives/superell/superell.c =================================================================== --- brlcad/trunk/src/librt/primitives/superell/superell.c 2011-02-04 06:45:27 UTC (rev 43006) +++ brlcad/trunk/src/librt/primitives/superell/superell.c 2011-02-04 06:48:12 UTC (rev 43007) @@ -43,9 +43,10 @@ #include "nmg.h" #include "rtgeom.h" #include "raytrace.h" -#include "nurb.h" +#include "../../librt_private.h" + const struct bu_structparse rt_superell_parse[] = { { "%f", 3, "V", bu_offsetof(struct rt_superell_internal, v[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, { "%f", 3, "A", bu_offsetof(struct rt_superell_internal, a[X]), BU_STRUCTPARSE_FUNC_NULL, NULL, NULL }, @@ -795,9 +796,15 @@ MAT4X3VEC(eip->a, mat, &vec[1*3]); MAT4X3VEC(eip->b, mat, &vec[2*3]); MAT4X3VEC(eip->c, mat, &vec[3*3]); - eip->n = rp->s.s_values[12]; - eip->e = rp->s.s_values[13]; + if (dbip->dbi_version < 0) { + eip->n = flip_dbfloat(rp->s.s_values[12]); + eip->e = flip_dbfloat(rp->s.s_values[13]); + } else { + eip->n = rp->s.s_values[12]; + eip->e = rp->s.s_values[13]; + } + return 0; /* OK */ } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |