anl.aida.viz
Class AppearanceFactory

java.lang.Object
  extended by anl.aida.viz.AppearanceFactory

public class AppearanceFactory
extends java.lang.Object

Version:
$Revision: 1.1 $ $Date: 2006/01/06 22:35:19 $

Nested Class Summary
static class AppearanceFactory.PolygonDraw
           
 
Field Summary
private static javax.vecmath.Color3f tmpColor
           
 
Constructor Summary
AppearanceFactory()
           
 
Method Summary
static javax.media.j3d.Appearance createAppearance()
           
private static boolean materialColorEquals(javax.media.j3d.Material mat, javax.vecmath.Color3f color)
           
static javax.media.j3d.Appearance setColoredAppearance(javax.media.j3d.Appearance appearance, java.awt.Color color)
           
static javax.media.j3d.Appearance setMaterialAppearance(javax.media.j3d.Appearance appearance, java.awt.Color color)
          Sets the material of the specified to appearance to the specified color.
static javax.media.j3d.Appearance setPolygonAppearance(javax.media.j3d.Appearance appearance, AppearanceFactory.PolygonDraw draw)
           
static javax.media.j3d.Appearance setTransparentAppearance(javax.media.j3d.Appearance appearance, int mode, float transVal)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tmpColor

private static javax.vecmath.Color3f tmpColor
Constructor Detail

AppearanceFactory

public AppearanceFactory()
Method Detail

setColoredAppearance

public static javax.media.j3d.Appearance setColoredAppearance(javax.media.j3d.Appearance appearance,
                                                              java.awt.Color color)

setTransparentAppearance

public static javax.media.j3d.Appearance setTransparentAppearance(javax.media.j3d.Appearance appearance,
                                                                  int mode,
                                                                  float transVal)

createAppearance

public static javax.media.j3d.Appearance createAppearance()

materialColorEquals

private static boolean materialColorEquals(javax.media.j3d.Material mat,
                                           javax.vecmath.Color3f color)

setMaterialAppearance

public static javax.media.j3d.Appearance setMaterialAppearance(javax.media.j3d.Appearance appearance,
                                                               java.awt.Color color)
Sets the material of the specified to appearance to the specified color. This will create a new Appearance if the specified appearance is null.

Parameters:
appearance -
color - the color to set the diffuse color of the material to.
Returns:
an appearance whose material is the specified color. If the specified appearance is not null, then it will be return having had its material's color set appropriately.

setPolygonAppearance

public static javax.media.j3d.Appearance setPolygonAppearance(javax.media.j3d.Appearance appearance,
                                                              AppearanceFactory.PolygonDraw draw)