Sender: |
|
Date: |
Sun, 6 Sep 2009 15:59:49 -0400 |
Reply-To: |
|
Subject: |
|
MIME-Version: |
1.0 |
Content-Transfer-Encoding: |
8bit |
Content-Type: |
text/plain; charset=ISO-8859-1 |
From: |
|
Comments: |
|
Parts/Attachments: |
|
|
Hi Sean,
for me the code for 3d display is not working anymore. Before the update I was able to display a
scene but was not able to change colors.
After the update I get the exception:
Exception in thread "AWT-EventQueue-0" javax.media.j3d.RestrictedAccessException: Cannot
modify capability bits on a live or compiled object
at javax.media.j3d.SceneGraphObject.setCapability(SceneGraphObject.java:101)
at sim.portrayal3d.SimplePortrayal3D.setPickableFlags(SimplePortrayal3D.java:235)
at sim.portrayal3d.SimplePortrayal3D.setPickableFlags(SimplePortrayal3D.java:227)
at sim.portrayal3d.simple.PrimitivePortrayal3D.getModel(PrimitivePortrayal3D.java:167)
at
sim.portrayal3d.SparseFieldPortrayal3D.wrapModelForNewObject(SparseFieldPortrayal3D.java:77)
at sim.portrayal3d.SparseFieldPortrayal3D.updateModel(SparseFieldPortrayal3D.java:157)
at sim.portrayal3d.FieldPortrayal3D.getModel(FieldPortrayal3D.java:182)
at sim.display3d.Display3D.updateSceneGraph(Display3D.java:1209)
at sim.display3d.Display3D$12.run(Display3D.java:1152)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
After having a look inside the source code it looks like there some slight differences between the
various XXXPortrayal3D classes that might not be intended, like the missing call of
setShape3DFlags(Shape3D shape) where I guess (really a wild guess) the problem might be
located.
For a quick fix (it's late in my time zone) I rely only on CubePortrayal3D and the code does not
throw any exception at the moment. Using the SpherePortrayal3D class does crash the
application. I don't have the time to explore on this subject today and tomorrow so you or Gabriel
may have a quick fix available.
Regards,
Jörg
|
|
|