Hello Marcus,

Marcus Lindblom wrote:
> So, VisitSubTree works fine, but IntersectAction probably needs some 
> work in order to show the correct path.

"show the correct path"? Is this related to the tex coord code you 
posted, that relies on getToWorld() ?
It is a limitation of VisitSubTree that it breaks the parent chain and 
therefore can not get the to-world matrix.

> (Yes, I know, I'm going down a multiple-parents-per-node path here, 
> which OpenSG tries to avoid)
> 
> Nevertheless, what I mostly need is the actual to-world transform of the 
> intersected node,

the matrix could be just another element of the "hit record" the IA 
holds. However the IA would need its own matrix stack to actually 
accumulate transformations along the path it takes - after all 
getToWorld() on the node with the hit does not work... ;)

> not necessarily the entire path from root to node. 
> (Although it might be handy to have as well...)

Maybe, but then you'd need a stack of Node * as well and make sure every 
Node on the path gets pushed/popped, instead of only those that change 
the transformation matrix - I guess a suitable default functor could be 
used.

> Does it seem a reasonable thing to fix?

sure, providing the to-world matrix seems like a better idea than e.g. 
computing the tex coords of the hit point (otherwise next month it might 
become necessary to compute/store tangent space as well, etc.)

> If so, how should I go about patching that? Either just grab the 
> transform and add get-function for it (similar to Point/Object/Normal) 
> or is there some better way?

Sounds reasonable to me.

        Cheers,
                Carsten


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to