I'm trying to vary the transparency of a cube during the simulation
I define the following....
public sim.portrayal3d.simple.CubePortrayal3D representation;
representation = new sim.portrayal3d.simple.CubePortrayal3D(colour,size)
And then attempt to change the transparency by...
I noticed that nothing was appearing, looked like the cubes had 0
Surrounding the setTransparency call with a try catch I realised the
follow exception was being thrown...
javax.media.j3d.CapabilityNotSetException: Appearance: no capability to
Looking into CubePortrayal3D.getModel I found the following...
131: Shape3D localShape = new Shape3D(quadArray,appearance);
Which should allow you to change the appearance properties of the Shape3D.
However, is the problem that I'm calling getTransparencyAttributes()
when localShape.setCapability(Shape3D.ALLOW_APPEARANCE_READ); has not
Or I'm I going about this all the wrong way? How should I change the
transparency of a CubePortrayal3D (or more generally any Portrayal3D).
This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.