Class PolygonAttributes


  • public class PolygonAttributes
    extends NodeComponent
    The PolygonAttributes object defines attributes for rendering polygon primitives. Polygon primitives include triangles, triangle strips, triangle fans, and quads. The polygon attributes that can be defined are:
    • Rasterization mode - defines how the polygon is drawn: as points, outlines, or filled.

      • POLYGON_POINT - the polygon is rendered as points drawn at the vertices.
      • POLYGON_LINE - the polygon is rendered as lines drawn between consecutive vertices.
      • POLYGON_FILL - the polygon is rendered by filling the interior between the vertices. The default mode.
    • Face culling - defines which polygons are culled (discarded) before they are converted to screen coordinates.

      • CULL_NONE - disables face culling.
      • CULL_BACK - culls all back-facing polygons. The default.
      • CULL_FRONT - culls all front-facing polygons.
    • Back-face normal flip - specifies whether vertex normals of back-facing polygons are flipped (negated) prior to lighting. The setting is either true, meaning to flip back-facing normals, or false. The default is false.
    • Offset - the depth values of all pixels generated by polygon rasterization can be offset by a value that is computed for that polygon. Two values are used to specify the offset:
      • Offset bias - the constant polygon offset that is added to the final device coordinate Z value of polygon primitives.
      • Offset factor - the factor to be multiplied by the slope of the polygon and then added to the final, device coordinate Z value of the polygon primitives.
      These values can be either positive or negative. The default for both of these values is 0.0.

See Also:
Appearance