"Mathieu Scorpionis" writes:
> Hello
>
> This is my problem :
>
> I load a *.3ds file (an aircraft). I don't have the software 3dsMax so I
> don't know how it was created...
>>From that file, I do bascially :
>
[...]
>
> This is Okay, I see a part of the aircraft that becomes transparent, when the
> mouse cursor goes in front of it.
>
> What I would want to do, afterwards, is that if the cursor leaves that part
> of the aircraft, the rendering comes back to the initial state (not
> transparent).
> But I don 't know how to do... the main question behind my post (sorry for
> being so long !) is that I don't understand why the intersector accesses to a
> drawable, while the aircraft comes from a Node File.
> I believed that drawables were linked to Geode class ?!
>
A Geode "is a" Node.
>
> When I ask for the strings strName and strNameParent with the
>functions :
> strName = CString(hitr->drawable->getName().c_str());
> strNameParent = CString(hitr->drawable->getParent(0)->getName().c_str());
>
> I see "" in strName
> and "Tail" or "Wing" or "Rotor"... in strNameParent, depending on where the
> cursor is. Logic.
> So the intersector reads someting that comes from the node file.
> But is this a drawable ??
>
> In the beginning of the appli, can I have the list of all drawables, those
> sub-parts of the aircraft model ("tail", "wing" ...) and put a osg::StateSet
> on each of them ?
> If I could, I would activate/desactivate transparency possibilities as I want.
> For the moment, if I have access to a drawable (via the hitr->drawable), I
> don't have access to others, so when a drawable becomes transparent, it will
> always be. I can't manipulate several drawables in the same time.
>
Why can't you store the pointer to the drawables you have modified?
--
Alberto
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org