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.
-
CULL_BACK
- Cull all back-facing polygons.
-
CULL_FRONT
- Cull all front-facing polygons.
-
CULL_NONE
- Don't perform any face culling.
-
POLYGON_FILL
- Render polygonal primitives by filling the interior of the polygon.
-
POLYGON_LINE
- Render polygonal primitives as lines drawn between consecutive
vertices of the polygon.
-
POLYGON_POINT
- Render polygonal primitives as points drawn at the vertices
of the polygon.
-
PolygonAttributes()
- Constructs PolygonAttributes object with default values.
-
PolygonAttributes(int, int, float)
- Constructs PolygonAttributes object with specified values.
-
getCullFace()
- Gets the face culling for this
appearance component object.
-
getPolygonMode()
- Gets the polygon rasterization mode for this
appearance component object.
-
getPolygonOffset()
- Gets the polygon offset.
-
setCullFace(int)
- Sets the face culling for this
appearance component object.
-
setPolygonMode(int)
- Sets the polygon rasterization mode for this
appearance component object.
-
setPolygonOffset(float)
- Sets the polygon offset to the specified value.
POLYGON_POINT
public static final int POLYGON_POINT
- Render polygonal primitives as points drawn at the vertices
of the polygon.
POLYGON_LINE
public static final int POLYGON_LINE
- Render polygonal primitives as lines drawn between consecutive
vertices of the polygon.
POLYGON_FILL
public static final int POLYGON_FILL
- Render polygonal primitives by filling the interior of the polygon.
CULL_NONE
public static final int CULL_NONE
- Don't perform any face culling.
CULL_BACK
public static final int CULL_BACK
- Cull all back-facing polygons.
CULL_FRONT
public static final int CULL_FRONT
- Cull all front-facing polygons.
PolygonAttributes
public PolygonAttributes()
- Constructs PolygonAttributes object with default values.
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.
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
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
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
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
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
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