Hello Oliver,

You say you are using osg version 2.8.3  and osg binaries.

The only Windows binaries for 2.8.3 I could find on openscenegraph.org are the following:

http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-2.8.3/binaries/Windows/VisualStudio8/

They are for Visual C++ version 8.

The stack trace that you provide mentions msvcr90.dll. This is the runtime dll for Visual C++ version 9.

If you are using Visual C++ version 9 then you need to use osg binaries for Visual C++ version 9.

Regards,
Peter

----- Original Message ----- From: "Olivier Martinaud" <olivier.martin...@thalesgroup.com>
To: <osg-users@lists.openscenegraph.org>
Sent: Monday, May 17, 2010 7:08 PM
Subject: Re: [osg-users] problem with osgUtil::IntersectVisitor andosg::LineSegment


Hello Martin,


I'm using osg version 2.8.3 with visual C++ express, and my os is windows xp. I also tried the basic examples I could find on tutorials and on the osg website but I still have the same problem :(. I guess it comes from my configuration. I used this tutorial to install osg : http://dwightdesign.com/2009/05/installing-openscenegraph-280/.
I used the prebuilt version of osg.

Everything I tried on osg worked perfectly except for this function (I also tried polytope intersector, height above terrain... but I got the same error).

You're right it looks like the program is allocating all the memory to the hitlist (the size is over 4 billion). However it looks like the apply method works : I've fot a number of intersections but I just can't have access to the intersection points coordinates.

The code is as follows. m_node points to a model I loaded. The model works fine (it's basically a set of (a lot of) points joined by panels).

osg::LineSegment *ls = new
osg::LineSegment(osg::Vec3d(-5,-5,-5),osg::Vec3d(5,5,5));
osgUtil::IntersectVisitor *iv = new osgUtil::IntersectVisitor();
iv->addLineSegment(ls);
iv->apply(*m_node);
std::cout << iv->getNumHits(ls) << " intersection points (hits)." <<
std::endl; //result = 6
osgUtil::IntersectVisitor::HitList& hitlist = iv->getHitList(ls);
std::cout << "size : " << hitlist.size() << std::endl;
//std::vector<osgUtil::Hit>::iterator itr = hitlist.begin();
hitlist[0].getWorldIntersectPoint(); //causes unhandled exception...



Thanks for your help,

Olivier

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





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


--------------------------------------------------------------------

Hello,

I checked the installation of osg. I was not mixing debug and release. But to be sure I uninstalled debug. However I still have the same probem as before. I copied the stack trace if it helps. Do you have any idea ?

 osg65-osg.dll!100042aa()
[Les frames ci-dessous sont peut-être incorrects et/ou manquants, aucun symbole chargé pour osg65-osg.dll]
 osg65-osgUtil.dll!0048ad2c()
OSGDefaultProject.exe!PickHandler::coordinates3D(int mouseX=264839480, int mouseY=509, int tailleFenetre=750, double angleVue=2.6388121119329419e-308, double k1=2.6388121119329419e-308, double k2=2.6388121119329419e-308, double k3=2.6388121119329419e-308, double k4=2.6388121119329419e-308, double k5=2.6388121119329419e-308) Ligne 88 C++
OSGDefaultProject.exe!PickHandler::handle(const osgGA::GUIEventAdapter & ea=, osgGA::GUIActionAdapter & aa=) Ligne 33 C++
 osg65-osgGA.dll!0042854e()
 osg65-osgGA.dll!00421981()
 osg65-osgGA.dll!004219cc()
 osg65-osgViewer.dll!005b0727()
 ntdll.dll!7c91df5a()
 ntdll.dll!7c928b23()
 ntdll.dll!7c922d78()
 msvcr90.dll!785436c5()
 msvcr90.dll!785438b3()
 msvcr90.dll!785427b4()
 OSGDefaultProject.exe!pre_cpp_init()  Ligne 326 + 0x27 octets C
 msvcr90.dll!78542201()
 OSGDefaultProject.exe!__tmainCRTStartup()  Ligne 582 + 0x17 octets C
 kernel32.dll!7c816fe7()

Thank you,
Regards,
Olivier

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



--
This message has been scanned for viruses and
dangerous content by Pinpoint, and is
believed to be clean.

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

Reply via email to