123

Controlling appearance
TransparencyAttributes example code

  • Create TransparencyAttributes to set the transparency amount and mode
    TransparencyAttributes myTA = new TransparencyAttributes( );
    myTA.setTransparency( 0.5f );
    myTA.setTransparencyMode( TransparencyAttributes.BLENDED );
  • Create Appearance, set the transparency attributes, and assemble the shape
    Appearance myAppear = new Appearance( );
    myAppear.setTransparencyAttributes( myTA );
    Shape3D myShape = new Shape3D( myGeom, myAppear );