Michael Lees wrote:
[change object transparency]
> public sim.portrayal3d.simple.CubePortrayal3D representation;
> representation = new sim.portrayal3d.simple.CubePortrayal3D(colour,size)
> And then attempt to change the transparency by...
Where exactly are you calling this from?
I remember having some problems with changing the color of objects at
runtime as well and if I recall correctly the problem is the origin of
iirc you should call the above from the accompanying
javax.media.j3d.Behavior of your Portrayal3D. Basically you make the
call to changing your transparency from the processStimulus method in
that class. External objects can't change the properties of a Java3D
I wrote my own 3D portrayal at the time, so it might be different when
using the more standard components. Maybe someone else can confirm the
above and if correct you should find the solution in a Jva3D tutorial.
I don't have a code example handy right now, sorry.
Bruno Van Den Bossche
[log in to unmask]