class INDET_CLUSTER
...
...
vrml is
local
r: REAL
t1,t2,t3: REAL
w,h,d: REAL
do
t1 := position.item (1)
t2 := position.item (2)
t3 := position.item (3)
r := arctan (t3 / t2)
w := 2 * size.item (1)
h := 2 * size.item (2)
d := 2 * size.item (3)
io.put (<<"Separator %< %N">>)
io.put (<<"Material %< diffuseColor 0 0 1 %> %N">>)
io.put (<<"Rotation %< rotation 0 0 1 ", r, " %> %N">>)
io.put (<<"Translation %< translation ", t1, t2, t3, " %> %N">>)
io.put (<<"Rotation %< rotation 0 0 1 ", s_theta, " %> %N">>)
io.put (<<"Rotation %< rotation 0 1 0 ", s_tilt, " %> %N">>)
io.put (<<"Rotation %< rotation 1 0 0 ", s_stereo, " %> %N">>)
io.put (<<"Cube %< width ", w, " height ", h, " depth ", d, " %> %N">>)
io.put (<<"%> %N">>)
end -- vrml