131

Controlling appearance
PolygonAttributes example code

  • Create PolygonAttributes to set the culling mode and fill style
    PolygonAttributes myPA = new PolygonAttributes( );
    myPA.setCullFace( PolygonAttributes.CULL_NONE );
    myPA.setPolygonMode( PolygonAttributes.POLYGON_FILL );
  • Create Appearance, set the polygon attributes, and assemble the shape
    Appearance myAppear = new Appearance( );
    myAppear.setPolygonAttributes( myPA );
    Shape3D myShape = new Shape3D( myGeom, myAppear );