Hello All,

How do i put an image on every side of a Shape3D ? Currently
I am doing the following, which displays one image a couple of times
next to each other onto the front and back side. On the other 4 sides
of the object (in this example a cube) something /is/ shown but it
looks more like some kind of stripes than the image which should be
displayed...


Appearance app = new Appearance();
Color3f black = new Color3f(0.0f, 0.0f, 0.0f);
Color3f white = new Color3f(1.0f, 1.0f, 1.0f);

// Set up the texture map
try {
    TextureLoader tex = new TextureLoader(new 
URL("file:///D:/Diplom/living/"+texture), this);
    Texture objTexture = tex.getTexture();

    objTexture.setBoundaryModeS(Texture.WRAP);
    objTexture.setBoundaryModeT(Texture.WRAP);
    app.setTexCoordGeneration(new TexCoordGeneration());
    app.setTexture(objTexture);

    TextureAttributes texAttr = new TextureAttributes();
    texAttr.setTextureMode(TextureAttributes.MODULATE);
    app.setTextureAttributes(texAttr);

    // Set up the material properties
    app.setMaterial(new Material(white, black, white, black, 1.0f));
    shape.setAppearance(app);
}

catch (MalformedURLException ex) {
  System.err.println(e);
  System.exit(1);
}

Best regards,
 Uwe                          mailto:[EMAIL PROTECTED]

===========================================================================
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