[osg-submissions] try doubles for mathinLineSegment::intersect() methods
Andy Skinner
Andy.Skinner at mathworks.com
Tue Feb 19 10:16:38 PST 2008
OK, I've looked at this some more.
Yeah, we definitely need to switch the types of the local variables to
use the correct value type. I think that, plus what you've already
done, would answer my changes. I switched a bit around in the last
stuff to "optimize" a couple of things that were done twice (a-b and
b-a), but I don't know that it was worth doing, compared to the
readability.
I still have to look to see what I think about having different methods
for different types. Specifically, would we get the new one, or would
we have to write a new visitor that calls the double version? I want to
make sure we benefit from the double precision.
andy
-----Original Message-----
From: osg-submissions-bounces at lists.openscenegraph.org
[mailto:osg-submissions-bounces at lists.openscenegraph.org] On Behalf Of
Robert Osfield
Sent: Monday, February 18, 2008 9:07 AM
To: OpenSceneGraph Submissions
Subject: Re: [osg-submissions] try doubles for
mathinLineSegment::intersect() methods
The first step towards Vec3d support in LineSegment I have introduced
a typedef into LineSegment:
typedef Vec3d vec_type;
typedef vec_type::value_type value_type;
I have also changed various methods and intenals of LineSegment to use
these typedefs rather than just Vec3. Its a first step as I haven't
changed all the internals to use floats - they should now use the
value_type method. We should also have several intersect functions,
ones with float/Vec3f and ones with double/Vec3d to ensure that
calling code can remain using the types that suit the calling code.
I have checked these changes as they stand to get the ball rolling.
Andy's changes need to be reviewed against mine, and a new set of
changes made to complete the work above.
Robert.
_______________________________________________
osg-submissions mailing list
osg-submissions at lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegr
aph.org
More information about the osg-submissions
mailing list