hi.
after compile() my objRoot (BranchGroup), i detached some children and attached new
ones with picking. but when i try to pick the new child object, i got these error
messages.
Exception occurred during Behavior execution:
java.lang.IllegalStateException: Picking can only work if BranchGroup is alive
at javax.media.j3d.BranchGroup.pickClosest
The problem here is, that i can add the child to the existing objRoot, but i cannot
make it alive.
the code is as follows.
class MyClass ...
{
SimpleUniverse su;
su = ...;
public void createBranchGroup()
{
...
...
objRoot.addChild(new myBranchGroup(su));
}
}
class myBranchGroup extends BranchGroup(SimpleUniverse su)
{
.....
TransformGroup trans = new TransformGroup();
this.addChlid(trans);
PickTranslateBehavior pick = new PickTranslateBehavior(this, new Canvas3D
(SimpleUniverse.getPreferredConfiguration()), new BoundingBox() );
this.addChild(pick);
}
i setup needed capability bits (CHILDREN_READ, CHILDREN_WRITE, ENABLE_PICK_REPORTING,
etc). but this code generate the error before. how can i add a child and make it
alvie?
N�����r��zǧu隊[h�+-��ڲ�ܢf�v)ܖ�^�{ay�ʇ�鞲ƠzȠ���$@�2
LDDI1h��z����i���zf���%��lz��j���w(��݊w%�ע��^n�r��azg�����i