[osg-users] how i can remove a sphere that is in a vector in the scene
Robert Osfield
robert.osfield at gmail.com
Thu Oct 22 05:37:53 PDT 2015
Hi Alvaro,
In principle doing an Group::addChild(nodePtr) followed later by a
Group::removeChild(nodePtr) should remove it from the scene graph, so it
"should" work.
What you implementation is doing wrong is not something we can guess at
given the information provided. Something, somewhere in your appliction is
doing things wrong, but as we don't have a code sample if front of us there
is nothing we can do to help.
Try creating a small example that does something like what you are doing,
but just focused on the sequence of operations { addChild(), rendering,
removeChild(), rendering } to illustrate what you are intending to happen.
There is chance you'll spot your mistake when writing this small example,
or if the problem persist you can post it to this thread so others can have
a look at it.
Robert.
On 22 October 2015 at 12:52, Alvaro Ginestar <alvaroginestar at hotmail.com>
wrote:
> hi everyone!!
> i try remove a sphere, with "removechild" it doesn't work.
> i use root->addChild(vector[x]); for to add the sphere in a node root and
> then i try to remove with root->removeChild(vector[x]);
> In the scene is draw a sphere, but it doesn't remove the sphere.
> someone know I'm doing wrong?
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20151022/f5c445db/attachment-0003.htm>
More information about the osg-users
mailing list