Uwe, try to call box.getShape(int index) (if it's a Box class that u r using)
and then set appeareance for every returned shape (box sides) separatly. This
does work.
vladimir
-=V=-
>-------<=============>-------<
Join in Java community now!
http://JavaCafe.VirtualAve.net/
>-------<=============>-------<
In your previous letter u wrote:
--------------------------------
UT> Hello All,
UT> How do i put an image on every side of a Shape3D ? Currently
UT> I am doing the following, which displays one image a couple of times
UT> next to each other onto the front and back side. On the other 4 sides
UT> of the object (in this example a cube) something /is/ shown but it
UT> looks more like some kind of stripes than the image which should be
UT> displayed...
UT> Appearance app = new Appearance();
UT> Color3f black = new Color3f(0.0f, 0.0f, 0.0f);
UT> Color3f white = new Color3f(1.0f, 1.0f, 1.0f);
UT> // Set up the texture map
UT> try {
UT> TextureLoader tex = new TextureLoader(new
URL("file:///D:/Diplom/living/"+texture), this);
UT> Texture objTexture = tex.getTexture();
UT> objTexture.setBoundaryModeS(Texture.WRAP);
UT> objTexture.setBoundaryModeT(Texture.WRAP);
UT> app.setTexCoordGeneration(new TexCoordGeneration());
UT> app.setTexture(objTexture);
UT> TextureAttributes texAttr = new TextureAttributes();
UT> texAttr.setTextureMode(TextureAttributes.MODULATE);
UT> app.setTextureAttributes(texAttr);
UT> // Set up the material properties
UT> app.setMaterial(new Material(white, black, white, black, 1.0f));
UT> shape.setAppearance(app);
UT> }
UT> catch (MalformedURLException ex) {
UT> System.err.println(e);
UT> System.exit(1);
UT> }
UT> Best regards,
UT> Uwe mailto:[EMAIL PROTECTED]
UT> ===========================================================================
UT> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
UT> of the message "signoff JAVA3D-INTEREST". For general help, send email to
UT> [EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
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".