Can't see Cylinder
Hi All
I need your help please.
What is wrong with the following code? I can't see the Cylinder I created.
Only see Black screen.
Thank u in advance
BranchGroup objRoot = new BranchGroup();
Cylinder cy = new Cylinder(radius,height);
ColoringAttributes ca = new ColoringAttributes();
ca.setColor (0.5f, 0.7f, 0.0f);
Appearance app = new Appearance();
app.setColoringAttributes(ca);
TransparencyAttributes trans = new TransparencyAttributes();
trans.setTransparency(0.75f);
app.setTransparencyAttributes(trans);
cy.setAppearance(app);
Transform3D rot = new Transform3D();
TransformGroup tg = new TransformGroup(rot);
tg.addChild(cy);
objRoot.addChild(tg);
objRoot.compile();
of course objRoot is added to SimpleUniverse class but to make things short I won't show it here

