~ubuntu-branches/ubuntu/utopic/sweethome3d/utopic-proposed

« back to all changes in this revision

Viewing changes to src/com/eteks/sweethome3d/j3d/Wall3D.java

  • Committer: Bazaar Package Importer
  • Author(s): Gabriele Giacone
  • Date: 2010-05-29 13:17:46 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100529131746-mix5l902gjywddob
Tags: 2.4+dfsg-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
 * Root of wall branch.
58
58
 */
59
59
public class Wall3D extends Object3DBranch {
60
 
  private static final Material DEFAULT_MATERIAL = new Material();
 
60
  private static final Material          DEFAULT_MATERIAL            = new Material();
 
61
  private static final TextureAttributes MODULATE_TEXTURE_ATTRIBUTES = new TextureAttributes();
 
62
  
61
63
  private static final Map<Integer, Material> materials = new HashMap<Integer, Material>();
62
64
  
63
65
  static {
64
66
    DEFAULT_MATERIAL.setCapability(Material.ALLOW_COMPONENT_READ);
 
67
    MODULATE_TEXTURE_ATTRIBUTES.setTextureMode(TextureAttributes.MODULATE);
65
68
  }
66
69
  
67
70
  private static final int LEFT_WALL_SIDE  = 0;
134
137
      wallAppearance.setMaterial(DEFAULT_MATERIAL);      
135
138
      wallAppearance.setCapability(Appearance.ALLOW_TEXTURE_WRITE);
136
139
      // Mix texture and wall color
137
 
      TextureAttributes textureAttributes = new TextureAttributes ();
138
 
      textureAttributes.setTextureMode(TextureAttributes.MODULATE);
139
 
      wallAppearance.setTextureAttributes(textureAttributes);
 
140
      wallAppearance.setTextureAttributes(MODULATE_TEXTURE_ATTRIBUTES);
140
141
    }
141
142
    
142
143
    return wallShape;