Hi Murat,

Look there:
http://www.kt.rim.or.jp/~s-matsu/sub/prog/unskill008.html
U'll have a sample code that is working fine with the same kind of 3D
objects.

>From: "A. Murat Tanyer" <[EMAIL PROTECTED]>
>Reply-To: Discussion list for Java 3D API <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: [JAVA3D] Appearance and Shape
>Date: Thu, 29 Nov 2001 15:12:27 +0000
>
>Dear Java3D members;
>
>I have a question about the appearance of Shape3D:
>
>1) I created an appearance
>
>     //Create a cylinder
>     PolygonAttributes attr = new PolygonAttributes();
>     ap = new Appearance();
>     Material mat = new Material();
>     mat.setLightingEnable(true);
>     ap.setMaterial(mat);
>
>2) I created a cylinder and assigned that appearance to that cylinder. I
>can see the appearance on the cylinder which is fine.
>     //Create a cylinder
>     Cylinder CylinderObj = new Cylinder(10.0f, 50.0f);
>     CylinderObj.setAppearance(ap);
>     objTrans.addChild(CylinderObj);
>
>3) I created a box and assigned the same appearance to that box.
>However, I cannot see the appearance on the box. On the scene, the
>cylinder has the appearance but the box doesn't (appears with white
>color). What is wrong?
>
>      // create box1
>      Transform3D transb1 = new Transform3D();
>      transb1.set(new Vector3d(0,0,0));
>      TransformGroup TGTb1 = new TransformGroup(transb1);
>
>      Box box1 = new Box(40.0f, 50.0f, 60.0f);
>      box1.setAppearance(ap);
>      TGTb1.addChild(box1);
>
>Appreciate any help.
>
>Regards
>Murat
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff JAVA3D-INTEREST".  For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".


_________________________________________________________________
Downloaden Sie MSN Explorer kostenlos unter http://explorer.msn.de/intl.asp

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to