/** * Sets the constant polygon offset to the specified value. * This screen space * offset is added to the final, device coordinate Z value of polygon * primitives. * @param polygonOffset the constant polygon offset * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public void setPolygonOffset(float polygonOffset) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_OFFSET_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("PolygonAttributes10")); if (isLive()) ((PolygonAttributesRetained)this.retained).setPolygonOffset(polygonOffset); else ((PolygonAttributesRetained)this.retained).initPolygonOffset(polygonOffset); }
/** * Sets the back face normal flip flag to the specified value. * This flag indicates whether vertex normals of back facing polygons * should be flipped (negated) prior to lighting. When this flag * is set to true and back face culling is disabled, polygons are * rendered as if the polygon had two sides with opposing normals. * This feature is disabled by default. * @param backFaceNormalFlip the back face normal flip flag * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public void setBackFaceNormalFlip(boolean backFaceNormalFlip) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_NORMAL_FLIP_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("PolygonAttributes5")); if (isLive()) ((PolygonAttributesRetained)this.retained).setBackFaceNormalFlip(backFaceNormalFlip); else ((PolygonAttributesRetained)this.retained).initBackFaceNormalFlip(backFaceNormalFlip); }
/** * Sets the polygon rasterization mode for this * appearance component object. * @param polygonMode the polygon rasterization mode to be used; one of * POLYGON_FILL, POLYGON_LINE, or POLYGON_POINT * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public void setPolygonMode(int polygonMode) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_MODE_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("PolygonAttributes7")); if (polygonMode < POLYGON_POINT || polygonMode > POLYGON_FILL) throw new IllegalArgumentException(J3dI18N.getString("PolygonAttributes8")); if (isLive()) ((PolygonAttributesRetained)this.retained).setPolygonMode(polygonMode); else ((PolygonAttributesRetained)this.retained).initPolygonMode(polygonMode); }
/** * Sets the face culling for this * appearance component object. * @param cullFace the face to be culled, one of: * CULL_NONE, CULL_FRONT, or CULL_BACK * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public void setCullFace(int cullFace) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_CULL_FACE_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("PolygonAttributes2")); if (cullFace < CULL_NONE || cullFace > CULL_FRONT) throw new IllegalArgumentException(J3dI18N.getString("PolygonAttributes3")); if (isLive()) ((PolygonAttributesRetained)this.retained).setCullFace(cullFace); else ((PolygonAttributesRetained)this.retained).initCullFace(cullFace); }
/** * Sets the polygon offset factor to the specified value. * This factor is multiplied by the slope of the polygon, and * then added to the final, device coordinate Z value of polygon * primitives. * @param polygonOffsetFactor the polygon offset factor * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * * @since Java 3D 1.2 */ public void setPolygonOffsetFactor(float polygonOffsetFactor) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_OFFSET_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("PolygonAttributes10")); if (isLive()) ((PolygonAttributesRetained)this.retained). setPolygonOffsetFactor(polygonOffsetFactor); else ((PolygonAttributesRetained)this.retained). initPolygonOffsetFactor(polygonOffsetFactor); }