<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16674" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=359252317-03072008><FONT face=Arial
size=2>The traversal mask gets bitwise ANDed with the node mask. You don't say
what your node mask is set to for your text and lines, but if you AND their node
mask with your traversal mask and you get non-zero, then they will be
intersection-tested. The default node mask is 0xffffffff; perhaps you forgot to
change it for the text and lines?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=359252317-03072008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=359252317-03072008><FONT face=Arial
size=2>What you probably want to do is have terrain nodes with node mask
(0x1<<0), text with (0x1<<1), lines with (0x1<<2), etc. This
way, your traversal mask of (0x1<<0), when ANDed with the node mask, will
result in non-zero only for terrain nodes.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=359252317-03072008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=359252317-03072008>
<DIV align=left><FONT face=Arial size=2>Paul Martz</FONT></DIV>
<DIV align=left><FONT face=Arial><STRONG>Skew Matrix Software
LLC</STRONG></FONT></DIV>
<DIV align=left><FONT face=Arial size=2><A
href="http://www.skew-matrix.com/">http://www.skew-matrix.com</A></FONT></DIV>
<DIV align=left><FONT face=Arial size=2>+1 303 859
9466</FONT></DIV></SPAN></DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B>
osg-users-bounces@lists.openscenegraph.org
[mailto:osg-users-bounces@lists.openscenegraph.org] <B>On Behalf Of </B>Jason
Beverage<BR><B>Sent:</B> Thursday, July 03, 2008 11:20 AM<BR><B>To:</B> osg
users<BR><B>Subject:</B> [osg-users] Only intersecting certain nodes in the
scene graph<BR></FONT><BR></DIV>
<DIV></DIV>Hi all,<BR><BR>This is probably a very basic question, but I'm
having a hard time understanding how the traversal masks work when using an
IntersectionVisitor.<BR><BR>I have a scene that contains an osgdem generated
terrain database as well as other nodes such as text labels, lines, etc.
In certain situations, I only want to compute the intersections against the
terrain database.<BR><BR>I created a node mask for the terrain, 0x1, and used
setNodeMask to set it on the root node of the terrain database.<BR><BR>I am
using the computeIntersections function of Viewer and passed along that
traversal mask hoping that it would only intersect the paged database.
However, the computeIntersections function is computing intersections against
all of the nodes in the scene graph instead of just the paged
database.<BR><BR>Does this usage sound correct or am I way off
base?<BR><BR>Thanks!<BR><BR>Jason <BR></BLOCKQUOTE></BODY></HTML>