antonio_lioy schrieb:
Hi guys, I'm using Intersect Action on a scene. The method getHitObject returns
a NodePtr, but which node is it? I suppose it is the node whose geometry core
was hit by the ray, is this correct?
I need a quick way to find which one of my vrml models on the scene was hit. I
was thinking of setting the name of all geometry cores of each model to the
name of the model itself... Is this allright?
Thanks a lot
Esimio prof. Antonio Lioy
Hello Antonio,
I have my model directly set under the scene root which is a GroupNode. So I
compare the parent of the hidden node until it is the scene root.
if(m_intersectAct->didHit()) {
hiddenObj = m_intersectAct->getHitObject();
while(hiddenObj->getParent() != m_scene) {
hiddenObj = hiddenObj->getParent();
}
}
So hiddenObj is now the object directly under root.
--
Love&Peace...
Christian Kanthak
University of Bremen
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users