[osg-users] computeIntersections problem

2008-12-23 Thread Francesco Argese
Hi all,

i'm trying to implement PickHandler in my application with osg 1.2.
Following example osg::pick i have written the following lines of
code:

bool PickHandler::pick (const double x, const double y,
osgProducer::Viewer* viewer)
{
std::vectorosgUtil::Hit hlist;
if ( viewer-computeIntersections(x, y, hlist) )
{
   //Here i handle the information recovered from computeIntersections()
hlist.clear();
}
return true;
}

Im working under Windows: the resulting application works well if i
compile it in release mode but when use in debug mode it give me the
following error on instruction hlist.clear(). If i don't call this
instruction it give me the same error at the return (because the
application try to empty Heap).

Debug Assertion Failed
File:dbddel.cpp
Line:52

Exception: _BLOCK_TYPE_IS_VALID(pHead-nBlockUse).

I have tried to comment the code containing computeIntersection and
all works well. It seems that computeIntersections function do
something on hlist, avoiding to empty memory.

How can i resolve this problem? Does exist another functionto to have
the same behaviour? How can i try to resolve this problem?

Thanke in advance
Francesco Argese
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] ComputeIntersections problem

2008-10-20 Thread Albino Rodrigues
Hi all,

 

I have just converted a number of applications from osg 2.2 to osg 2.61 and
have found issues with computeIntersections.

 

If I use y values relative to left/top (as 2.2) in the call they fail, but
if I use y values relative to left/bottom in the call then everything works
fine.

 

Is this by design, or is there a bug in osg 2.61?

 

Bino

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