[osg-users] [3rdparty] getshape() on geometry return Null pointer ?
Hi, i construct some geometry (with setVertexArray, addPrimitiveSet, ...) when i call getshape() from this geometry, it return me null pointer ? could anyone tell me why ? Thank you! Cheers, vincent -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46046#46046 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] display problem with transparency
Hi, i have 2 transparents spheres, one inside another. The smallest one (inside) has a texture. My pb is: when moving camera, the smallest sphere disappear. (Spheres et lights have always the same position) Is there some constraint in osg with transparency? ( maximum number of transparent object in graph? maximum number of embedded transparent object ? Thank you for your help ! Cheers, vincent -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46159#46159 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] SetScale and AnimationPathCallback PB
Hi, maybe was it obvious ... maybe not,? so i share a solution ... (i found after reading AnimationPathCallback source code) i used ControlPoint constructor with 3 parameter (third is scale) even if scale doesen't hange from one control point to another : for each control point i : ControlPoint cp_i = ControlPoint ( pos_i, quat_i, ((PositionAttitudeTransform*)noeud)->getScale() )) Cheers, vincent -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37091#37091 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] SetScale and AnimationPathCallback PB
Hi, i scaled one node et associated an animationPatchCallBack to it. It seems that AnimationPathCallback cancels the scaling since the node (a pat) is transformed by the CB but is not scaled anymore. ? ... ref_ptr apCallBack = new osg::AnimationPathCallback( animationPath.get() ); noeud->setUpdateCallback( apCallBack.get() ); ... noeud->setScale(Vec3d(2,2,0.5)); noeud->getOrCreateStateSet()->setMode(GL_NORMALIZE, osg::StateAttribute::ON); Thank you! Cheers, vincent -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37081#37081 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] unexecpted result with SetHomePosition
Hi, my question concern setHomePosition of MatrixManipulator and subclasses. Parameters are quite explicite and in therory first one indicate position of camera, the seond parametre = target of camera ? Am i wrong... i surely forget some detail since : in practice, position and direction of camera do not corespond to the parameter given to that method . I read old topic and some source example. .. but results are sometimes so strange when changing the parameters values, that make me think i should konw some important thing or tip about this method Thank you for your help ! Cheers, vincent -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36563#36563 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] When / howto stop or remove animation path
in fact, while i was writing last reply, i found one solution : void CB_AnimationPonctuelle::operator() (osg::Node *node, osg::NodeVisitor *nv){ if (getPause()) { traverse(node, nv); return; } osg::AnimationPathCallback::operator()(node,nv);// méthode originale (de la classe de base) if (getAnimationTime()>_duree_animation) setPause(true); } it's maybe not efficient (surely less than mask) but it work. one souldn't forget traverse to let update visitor go through children ... Thank you! Cheers, vincent -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36476#36476 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] When / howto stop or remove animation path
Hi, thank you, robert, for the advice. i actually subclass AnimationPathCallback and rewrite operator as folows : void CB_AnimationPonctuelle::operator() (osg::Node *node, osg::NodeVisitor *nv){ osg::AnimationPathCallback::operator()(node,nv);// méthode originale (de la classe de base) if (getAnimationTime()>_duree_animation) { setPause(true); } } to make the animation just one time, i test animation time againt callback time (maybe not the best solution but it work...) My problem is to stop (or pause the callback) when this test is true i tried to use setPause() method but it do not pause anything :-( and callback keep on running how should i use this method setPaused() ? is ther another issue to pause a callback ? thanks a lot for your help nb : i found mask approach in the folowing topic but i hope there exist a simplest way ... t=3844 Thank you! Cheers, vincent -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36475#36475 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] When / howto stop or remove animation path
Hi, i use animation path for moving a geode from one point to another ,(from its position to a target position acquired by picking) It works but , once the animation has finished (target position is reached), il seems that callback is still running ... and the result is i can move anymore the geode , by user input for exemple. geode keep on go to target position. ..; even if i call setLoopMode(osg::AnimationPath::NO_LOOPING) I'd like to run this animation just one time time, pause it et restart it later with other taget position. . My question is : How could i know my animation is finished ? and how can i pause it and restart it later? Thank you! Cheers, vincent -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36400#36400 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org