Exemplo n.º 1
0
 public void markStartOfHeatConduction(int blockIndex, Material material) {
   Box cell = getBlockWithGivenId(blockIndex);
   Appearance app = new Appearance();
   ColoringAttributes coloringAttributes =
       new ColoringAttributes(new Color3f(1.0f, 0.0f, 0.0f), ColoringAttributes.NICEST);
   app.setTransparencyAttributes(new TransparencyAttributes(TransparencyAttributes.FASTEST, 0.5f));
   app.setColoringAttributes(coloringAttributes);
   cell.setAppearance(app);
 }
Exemplo n.º 2
0
 private void setCellColor(Color3f color, int blockId, Material material, boolean heatedAir) {
   Box cell = getBlockWithGivenId(blockId);
   Appearance app = new Appearance();
   ColoringAttributes coloringAttributes =
       new ColoringAttributes(color, ColoringAttributes.NICEST);
   {
     app.setTransparencyAttributes(
         new TransparencyAttributes(TransparencyAttributes.FASTEST, material.get_transparency()));
   }
   app.setColoringAttributes(coloringAttributes);
   cell.setAppearance(app);
 }
Exemplo n.º 3
0
 public void addNewBlockToScene(Material material, int blockIndex) {
   // System.out.println( "block index " + blockIndex );
   Box cell = getBlockWithGivenId(blockIndex);
   Appearance app = new Appearance();
   Color3f cellColor = material.get_color();
   ColoringAttributes coloringAttributes =
       new ColoringAttributes(cellColor, ColoringAttributes.NICEST);
   float transparency = material.get_transparency();
   app.setColoringAttributes(coloringAttributes);
   app.setTransparencyAttributes(
       new TransparencyAttributes(TransparencyAttributes.FASTEST, transparency));
   System.out.println("color " + cellColor);
   cell.setAppearance(app);
 }