Hi,

have you checked what the members of the TriangleIntersection struct are? I think you must make them double too, this it where we had problems in some of our code.

jp

Fred Smith wrote:
Thanks for your reply.

I tried modifying LineSegmentIntersector.cpp in osgUtil but it didn't work.

I went all the way and changed everything to use doubles, eg.:


Code:

        inline void operator () (const osg::Vec3& _v1,const osg::Vec3& _v2,const 
osg::Vec3& _v3, bool treatVertexDataAsTemporary)
        {
                        // Create local osg::Vec3d copies
                        osg::Vec3d v1(_v1.x(), _v1.y(), _v1.z());
                        osg::Vec3d v2(_v2.x(), _v2.y(), _v2.z());
                        osg::Vec3d v3(_v3.x(), _v3.y(), _v3.z());

                        [...]

            if (treatVertexDataAsTemporary)
            {
                _intersections.insert(std::pair<const 
float,TriangleIntersection>(r,TriangleIntersection(_index-1,normal,(float)r1,0,(float)r2,0,(float)r3,0)));
            }
            else
            {
                _intersections.insert(std::pair<const 
float,TriangleIntersection>(r,TriangleIntersection(_index-1,normal,(float)r1,&_v1,(float)r2,&_v2,(float)r3,&_v3)));
            }
     }




I turned all floats into doubles, 0.0f's into 0.0's, all osg::Vec3's into 
osg::Vec3d's...

I still get the same behavior.

Can you please be a bit more specific regarding other alternatives I have? 
(bounding box, pick ray clipping...)

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=20886#20886





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support.

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to