Re: [osg-users] HitLists

2010-06-23 Thread John Galt
Hi,

Thanks for the help guys. It worked. 

Alberto, I considered using IntersectionVisitor at first but found tutorials 
and examples that use IntersectVisitor so I decided to stick with it.

Thank you!

Cheers,
John

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





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


Re: [osg-users] HitLists

2010-06-22 Thread Alberto Luaces
Hi John,

"John Galt" writes:

> I can extract the first and the last hits using HitList.front() and 
> HitList.back() but I am having trouble with extracting the other hits in 
> between them.

>From include/osgUtil/IntersectVisitor, line 110:
 
typedef std::vector HitList;

So HitList is a vector, and you have several possibilities,

* Get the iterator for the first element with HitList::begin() and then
  increment it until HitList::end()

* Index the elements with HitList::operator[].

* ...

Anyway, osgUtil::IntersectVisitor is deprecated in favor of
osgUtil::IntersectionVisitor, consider using it.

-- 
Alberto

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


Re: [osg-users] HitLists

2010-06-22 Thread Trajce (Nick) Nikolov
This should be STL vector.

for (unsigned int i=0; i wrote:

> Hi,
>
> If my HitList contains multiple hits, how do I extract all of them starting
> from the first to the last?
>
> I can extract the first and the last hits using HitList.front() and
> HitList.back() but I am having trouble with extracting the other hits in
> between them.
>
>
> Thank you!
>
> Cheers,
> John
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=29242#29242
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] HitLists

2010-06-22 Thread John Galt
Hi,

If my HitList contains multiple hits, how do I extract all of them starting 
from the first to the last?

I can extract the first and the last hits using HitList.front() and 
HitList.back() but I am having trouble with extracting the other hits in 
between them.


Thank you!

Cheers,
John

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





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