Thank you for reply, Carsten >>Adding a call to dInitODE() at the top of main in the two test programs makes >>them work for me. i have already added a dInitODE at the top of main.
For debug, i made contrib/physics and OSGBaseLib libraries on VC2008. I tried to add only three of the following codes in the OpenSG sample program run correctly before i made, and linked these debug library. Then duplicate the behavior. 1. #include <OSGPhysics.h> 2. Add "dInitODE();" at top of the main 3. Add "PhysicsHandlerPtr physHandler = PhysicsHandler::create();" at middle of the main following is the stack when the test application is crashed. osgInit (OSGBaseFunctions.cpp:line 303) returnValue &= (*osgInitFunctions)[i](); (OSGBaseFunctions.cpp:line 454) PhysicsBoxGeomBase::createEmpty (OSGPhysicsBoxGeomBase.inl:line 87) newPtr(returnValue); (OSGPhysicsBoxGeomBase.inl:line 91) result->onCreate(); (OSGFieldContainerImpl.inl:line 253) PhysicsBoxGeom::onCreate (OSGPhysicsBoxGeom.cpp:line 79) PhysicsBoxGeomBase::setLenghts(tmpPtr->getLenghts()); (OSGPhysicsBoxGeom.cpp:line 83) dGeomBoxGetLengths(tmpPtr->id, t); (OSGPhysicsBoxGeom.cpp:line 99) return Vec3f(t[0], t[1], t[2]); (OSGPhysicsBoxGeom.cpp:line 100) <===== t[0] overflow!!(-1.#QNAN00) This is the reason of crash. Question: 1. "PhysicsBoxGeomBase::createEmpty" is called as initial function. Is it right? I don't use "PhysicsBoxGeomBase" in source code. 2. If this function call is valid, the reason why such a overflow occurs? and how to avoid this? The number of initial function (osgInitFunctions) is 6. Strangely enough, even if the physics library class is not used in a source code, then the number of initial function is still 6. My developing environment is VC2008(not SP1), so i try to install VC2008 SP1 and try again. >> There is CollDet <http://cg.in.tu-clausthal.de/research/colldet/>, I've not >> used it. Thank you for information. But unfortunately, this library licency is not match our requirement. thank you On Tue, 03 Aug 2010 12:15:38 -0500 Carsten Neumann <carsten_neum...@gmx.net> wrote: > Hello, > > 木戸 和彦 wrote: > > I am trying to use contrib physics library for collision detection by using > > OSGPhysicsxxxxx classes. > > I completed to compile ODE(ver0.11.1) library on VS2008 and contrib library > > by scon script. > > Next, i try to make a sample code(testSimplePhysics.cpp in Contrib/Physics) > > with these libraries. > > compile and link are ended normally, but program ended by access violation. > > I just tried this under linux with a ODE trunk checkout from a few > months ago (I don't think it has significant changes compared to > 0.11.1). It seems the problem is that nowadays ODE requires a call to > dInitODE() to initialize the library - at the time Contrib/Physics was > written that was apparently not needed. > Adding a call to dInitODE() at the top of main in the two test programs > makes them work for me. > > > Question: > > 1. Is the OSGContrib library available? > > 2. If yes, how to build and use it? > > I think you built it correctly, the test programs have just not been > kept up to date with changes to the ODE library. > > > 3. If no, does OpenSG equip other reasonable collision detection mechanism? > > There is CollDet <http://cg.in.tu-clausthal.de/research/colldet/>, I've > not used it. > > Cheers, > Carsten > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of $1 Million in cash or HP Products. Visit us here for more details: > http://p.sf.net/sfu/dev2dev-palm > _______________________________________________ > Opensg-users mailing list > Opensg-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/opensg-users -- <> ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users