Hi
I guess the nodes of a loaded .obj are Shapes3D. And the nodes of a loaded vrml are TGs...
I think you can get  all nodes BEFORE inserting it in the scene graph, and set your capabilities:
something like:

Hashtable hash = scene.getNamedObjects();
for (Enumeration e = hash.keys() ; e.hasMoreElements() ;)
   {
        Object obj = hash.getElement(e);
         if (obj instanceOf Shape3D)
         {
          Shape3D shape = (Shape3D)obj;
          shape.setCabapilities ( Shape3D.ALLOW...);
          ... 
         }
     }

(...)
/* add loaded object to scene graph*/
objRoot.addChild(scene);

 
This is just a ideia. I am not sure if it will fix you problem.

Alessandro

nagehan pala escreveu:
Hi all

My program loads two .obj files and they are added to a live scene
graph(Scene.getSceneGroup()) . They are pickable and they can be moved by
the user. And i want to draw a line between them during runtime. But a
runtime error given:


javax.media.j3d.CapabilityNotSetException: Shape3D: no capability to get
geometry

Before I tried it with ColorCubes and set this capability:
PickTool.setCapabilities(node, PickTool.INTERSECT_FULL)

And it was run. But I can't set this capability for loaded files, because
node can only be Shape3D, Morph or Geometry nodes.

i need help, please...

Nagehan Pala

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".


Reply via email to