Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - coordinate

#1
Extremely grateful if you can add removeChildren method.

I have another question that I have found "removeAllObjects" in "World" class.

When I add object3d A to object3d B, I have to add A to world too.

Does this mean that when I remove object3d A from object3d B, I have to remove A from world too?

(I use jpct first-time. I am not familiar with "world". In osg and jme, there is no "world", just node tree.)
#2
I used to use scene graph library like openscenegraph.

After i add amount of children to a node, i can remove them all with one method like removeChildren.

I don't understand is when i add children in jpct:

private void addChildren(Object3D obj) {
    obj.addChild(new Object3D()); // add child A
    obj.addChild(new Object3D()); // add child B
    ... ...
}


How can i remove all children in another function.

private void removeChildren(Object3D obj) {
    // i can not get all children from obj.
}


Thanks for your reply.
#3
I find "removeChild" method, but it can only remove one child.

And "clearObject" method is not work too.

So how can I delete all children (and their texture) from an object3d one-time.

Thanks.