All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.media.j3d.PolygonAttributes

java.lang.Object
   |
   +----java.media.j3d.SceneGraphObject
           |
           +----java.media.j3d.NodeComponent
                   |
                   +----java.media.j3d.PolygonAttributes

public class PolygonAttributes
extends NodeComponent
The PolygonAttributes object defines all rendering state that can be set as a component object of a Shape3D node.


Variable Index

 o CULL_BACK
Cull all back-facing polygons.
 o CULL_FRONT
Cull all front-facing polygons.
 o CULL_NONE
Don't perform any face culling.
 o POLYGON_FILL
Render polygonal primitives by filling the interior of the polygon.
 o POLYGON_LINE
Render polygonal primitives as lines drawn between consecutive vertices of the polygon.
 o POLYGON_POINT
Render polygonal primitives as points drawn at the vertices of the polygon.

Constructor Index

 o PolygonAttributes()
Constructs PolygonAttributes object with default values.
 o PolygonAttributes(int, int, float)
Constructs PolygonAttributes object with specified values.

Method Index

 o getCullFace()
Gets the face culling for this appearance component object.
 o getPolygonMode()
Gets the polygon rasterization mode for this appearance component object.
 o getPolygonOffset()
Gets the polygon offset.
 o setCullFace(int)
Sets the face culling for this appearance component object.
 o setPolygonMode(int)
Sets the polygon rasterization mode for this appearance component object.
 o setPolygonOffset(float)
Sets the polygon offset to the specified value.

Variables

 o POLYGON_POINT
 public static final int POLYGON_POINT
Render polygonal primitives as points drawn at the vertices of the polygon.

 o POLYGON_LINE
 public static final int POLYGON_LINE
Render polygonal primitives as lines drawn between consecutive vertices of the polygon.

 o POLYGON_FILL
 public static final int POLYGON_FILL
Render polygonal primitives by filling the interior of the polygon.

 o CULL_NONE
 public static final int CULL_NONE
Don't perform any face culling.

 o CULL_BACK
 public static final int CULL_BACK
Cull all back-facing polygons.

 o CULL_FRONT
 public static final int CULL_FRONT
Cull all front-facing polygons.

Constructors

 o PolygonAttributes
 public PolygonAttributes()
Constructs PolygonAttributes object with default values.

 o PolygonAttributes
 public PolygonAttributes(int polygonMode,
                          int cullFace,
                          float polygonOffset)
Constructs PolygonAttributes object with specified values.

Parameters:
polygonMode - polygon rasterzation mode.
cullFace - polygon culling mode.
polygonOffset - polygon offset.

Methods

 o setCullFace
 public final void setCullFace(int cullFace)
Sets the face culling for this appearance component object.

Parameters:
cullFace - the face to be culled, one of: CULL_NONE, CULL_FRONT, or CULL_BACK
Throws: RestrictedAccessException
if the method is called when this object is part of live or compiled scene graph
 o getCullFace
 public final int getCullFace()
Gets the face culling for this appearance component object.

Returns:
the face to be culled
Throws: RestrictedAccessException
if the method is called when this object is part of live or compiled scene graph
 o setPolygonMode
 public final void setPolygonMode(int polygonMode)
Sets the polygon rasterization mode for this appearance component object.

Parameters:
polygonMode - the polygon rasterization mode to be used; one of POLYGON_FILL, POLYGON_LINE, or POLYGON_POINT
Throws: RestrictedAccessException
if the method is called when this object is part of live or compiled scene graph
 o getPolygonMode
 public final int getPolygonMode()
Gets the polygon rasterization mode for this appearance component object.

Returns:
polygonMode the polygon rasterization mode
Throws: RestrictedAccessException
if the method is called when this object is part of live or compiled scene graph
 o setPolygonOffset
 public final void setPolygonOffset(float polygonOffset)
Sets the polygon offset to the specified value. This screen space offset is added to the final, device coordinate Z value of polygon primitives.

Parameters:
polygonOffset - the polygon offset
Throws: RestrictedAccessException
if the method is called when this object is part of live or compiled scene graph
 o getPolygonOffset
 public final float getPolygonOffset()
Gets the polygon offset.

Returns:
polygonOffset the polygon offset
Throws: RestrictedAccessException
if the method is called when this object is part of live or compiled scene graph

All Packages  Class Hierarchy  This Package  Previous  Next  Index