Print

Print


I'm not sure why this is happening.  But, if I run my simulation with
the default CubePortrayal3D in MASON 12, I get the following exception:

--------------------------------------------------------------------------
javax.media.j3d.CapabilityNotSetException: Appearance: no capability to
set polygonAttributes
        at
javax.media.j3d.Appearance.setPolygonAttributes(Appearance.java:446)
        at
sim.portrayal3d.simple.CubePortrayal3D.getModel(CubePortrayal3D.java:129)
        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:1142)
        at sim.display3d.Display3D.step(Display3D.java:1098)
        at sim.display.GUIState$Repeat.step(GUIState.java:606)
        at sim.display.GUIState.step(GUIState.java:428)
        at sim.display.Console$56.run(Console.java:2277)
        at java.lang.Thread.run(Thread.java:619)
--------------------------------------------------------------------------

However, if I add the following two lines to the CubePortrayal3D
constructor:

appearance.setCapability(javax.media.j3d.Appearance.ALLOW_POLYGON_ATTRIBUTES_READ); appearance.setCapability(javax.media.j3d.Appearance.ALLOW_POLYGON_ATTRIBUTES_WRITE);

everything works out quite well.  Perhaps I'm violating some MASON
pattern?

-- 
glen e. p. ropella, 971-219-3846, http://tempusdictum.com