コード例 #1
0
ファイル: Scene3D.java プロジェクト: TeMPOraL/Sparkle
 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);
 }
コード例 #2
0
ファイル: Scene3D.java プロジェクト: TeMPOraL/Sparkle
 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);
 }
コード例 #3
0
ファイル: Scene3D.java プロジェクト: TeMPOraL/Sparkle
 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);
 }