/** * Retrieves current alpha test function. * @return the current alpha test function * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public int getAlphaTestFunction(){ if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_ALPHA_TEST_FUNCTION_READ)) throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes7")); return ((RenderingAttributesRetained)this.retained).getAlphaTestFunction(); }
/** * Retrieves the alpha test value. * @return the alpha test value. * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public float getAlphaTestValue(){ if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_ALPHA_TEST_VALUE_READ)) throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes5")); return ((RenderingAttributesRetained)this.retained).getAlphaTestValue(); }
/** * Retrieves the state of zBuffer Enable flag * @return true if depth buffer mode is enabled, false * if depth buffer mode is disabled * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public boolean getDepthBufferEnable(){ if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_DEPTH_ENABLE_READ)) throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes1")); return ((RenderingAttributesRetained)this.retained).getDepthBufferEnable(); }
/** * Retrieves the state of Depth Buffer Write Enable flag. * @return true if depth buffer is writable, false * if depth buffer is read-only * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public boolean getDepthBufferWriteEnable(){ if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_DEPTH_ENABLE_READ)) throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes3")); return ((RenderingAttributesRetained)this.retained).getDepthBufferWriteEnable(); }
/** * Retrieves current depth test function. * @return the current depth test function * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * * @since Java 3D 1.4 */ public int getDepthTestFunction(){ if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_DEPTH_TEST_FUNCTION_READ)) throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes15")); return ((RenderingAttributesRetained)this.retained).getDepthTestFunction(); }
/** * Retrieves the visibility flag for this RenderingAttributes object. * @return true if the object is visible; false * if the object is invisible. * @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 boolean getVisible() { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_VISIBLE_READ)) throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes9")); return ((RenderingAttributesRetained)this.retained).getVisible(); }
/** * Retrieves the ignoreVertexColors flag for this * RenderingAttributes object. * @return true if per-vertex colors are ignored; false * if per-vertex colors are used. * @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 boolean getIgnoreVertexColors() { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_IGNORE_VERTEX_COLORS_READ)) throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes13")); return ((RenderingAttributesRetained)this.retained).getIgnoreVertexColors(); }
/** * Retrieves the rasterOp enable flag for this RenderingAttributes * object. * @return true if raster operations are enabled; false * if raster operations are disabled. * @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 boolean getRasterOpEnable() { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_RASTER_OP_READ)) throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes11")); return ((RenderingAttributesRetained)this.retained).getRasterOpEnable(); }
/** * Retrieves the current stencil write mask for this RenderingAttributes * object. * * @return the stencil write mask. * * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * * @since Java 3D 1.4 */ public int getStencilWriteMask() { if (isLiveOrCompiled()) { if (!this.getCapability(ALLOW_STENCIL_ATTRIBUTES_READ)) { throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes17")); } } return ((RenderingAttributesRetained)this.retained).getStencilWriteMask(); }
/** * Retrieves the current raster operation for this RenderingAttributes * object. * @return one of: * ROP_CLEAR, ROP_AND, ROP_AND_REVERSE, ROP_COPY, ROP_AND_INVERTED, * ROP_NOOP, ROP_XOR, ROP_OR, ROP_NOR, ROP_EQUIV, ROP_INVERT, * ROP_OR_REVERSE, ROP_COPY_INVERTED, ROP_OR_INVERTED, ROP_NAND or ROP_SET * @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 int getRasterOp() { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_RASTER_OP_READ)) throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes11")); return ((RenderingAttributesRetained)this.retained).getRasterOp(); }
/** * Retrieves the stencil buffer enable flag for this RenderingAttributes * object. * * @return true if stencil buffer operations are enabled; false * if stencil buffer operations are disabled. * * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * * @since Java 3D 1.4 */ public boolean getStencilEnable() { if (isLiveOrCompiled()) { if (!this.getCapability(ALLOW_STENCIL_ATTRIBUTES_READ)) { throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes17")); } } return ((RenderingAttributesRetained)this.retained).getStencilEnable(); }
/** * Retrieves the stencil function, reference value, and comparison mask, * and copies them into the specified array. The caller must ensure * that this array has been allocated with enough space to hold the results. * * @param params array that will receive the current stencil function, * reference value, and comparison mask. The stencil function is copied * into element 0 of the array, the reference value is copied * into element 1, and the comparison mask is copied * into element 2. * * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * * @since Java 3D 1.4 */ public void getStencilFunction(int[] params) { if (isLiveOrCompiled()) { if (!this.getCapability(ALLOW_STENCIL_ATTRIBUTES_READ)) { throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes17")); } } ((RenderingAttributesRetained)this.retained).getStencilFunction(params); }
/** * Set alpha test value used by alpha test function. This value is * compared to the alpha value of each rendered pixel. * @param value the alpha test value * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public void setAlphaTestValue(float value){ if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_ALPHA_TEST_VALUE_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes4")); if (isLive()) ((RenderingAttributesRetained)this.retained).setAlphaTestValue(value); else ((RenderingAttributesRetained)this.retained).initAlphaTestValue(value); }
/** * Set alpha test function. This function is used to compare * each incoming (source) per-pixel alpha value with the alpha test value. * If the test passes, the pixel is written otherwise the pixel is not * written. * @param function the new alpha test function. One of * ALWAYS, NEVER, EQUAL, NOT_EQUAL, LESS, LESS_OR_EQUAL, GREATER, * GREATER_OR_EQUAL * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public void setAlphaTestFunction(int function){ if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_ALPHA_TEST_FUNCTION_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes6")); if (isLive()) ((RenderingAttributesRetained)this.retained).setAlphaTestFunction(function); else ((RenderingAttributesRetained)this.retained).initAlphaTestFunction(function); }
/** * Enables or disables depth buffer mode for this RenderingAttributes * component object. * * @param state true or false to enable or disable depth buffer mode * * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * * @see GraphicsConfigTemplate3D#setDepthSize */ public void setDepthBufferEnable(boolean state){ if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_DEPTH_ENABLE_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes0")); if (isLive()) ((RenderingAttributesRetained)this.retained).setDepthBufferEnable(state); else ((RenderingAttributesRetained)this.retained).initDepthBufferEnable(state); }
/** * Enables or disables writing the depth buffer for this object. * During the transparent rendering pass, * this attribute can be overridden by * the depthBufferFreezeTransparent attribute in the View object. * @param state true or false to enable or disable depth buffer Write mode * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * @see View#setDepthBufferFreezeTransparent */ public void setDepthBufferWriteEnable(boolean state) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_DEPTH_ENABLE_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes2")); if (isLive()) ((RenderingAttributesRetained)this.retained).setDepthBufferWriteEnable(state); else ((RenderingAttributesRetained)this.retained).initDepthBufferWriteEnable(state); }
/** * Sets the raster operation function for this RenderingAttributes * component object. * * @param rasterOp the logical raster operation, one of: * ROP_CLEAR, ROP_AND, ROP_AND_REVERSE, ROP_COPY, ROP_AND_INVERTED, * ROP_NOOP, ROP_XOR, ROP_OR, ROP_NOR, ROP_EQUIV, ROP_INVERT, * ROP_OR_REVERSE, ROP_COPY_INVERTED, ROP_OR_INVERTED, ROP_NAND or ROP_SET. * @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 setRasterOp(int rasterOp) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_RASTER_OP_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes10")); if (isLive()) ((RenderingAttributesRetained)this.retained).setRasterOp(rasterOp); else ((RenderingAttributesRetained)this.retained).initRasterOp(rasterOp); }
/** * Sets the visibility flag for this RenderingAttributes * component object. Invisible objects are not rendered (subject to * the visibility policy for the current view), but they can be picked * or collided with. The default value is true. * @param visible true or false to enable or disable visibility * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * * @see View#setVisibilityPolicy * * @since Java 3D 1.2 */ public void setVisible(boolean visible) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_VISIBLE_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes8")); if (isLive()) ((RenderingAttributesRetained)this.retained).setVisible(visible); else ((RenderingAttributesRetained)this.retained).initVisible(visible); }
/** * Sets the stencil write mask for this RenderingAttributes * object. This mask controls which bits of the * stencil buffer are written. * The default value is <code>~0</code> (all ones). * * @param mask the new stencil write mask. * * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * * @since Java 3D 1.4 */ public void setStencilWriteMask(int mask) { if (isLiveOrCompiled()) { if (!this.getCapability(ALLOW_STENCIL_ATTRIBUTES_WRITE)) { throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes16")); } } if (isLive()) ((RenderingAttributesRetained)this.retained).setStencilWriteMask(mask); else ((RenderingAttributesRetained)this.retained).initStencilWriteMask(mask); }
/** * Set depth test function. This function is used to compare each * incoming (source) per-pixel depth test value with the stored per-pixel * depth value in the frame buffer. If the test * passes, the pixel is written, otherwise the pixel is not * written. * @param function the new depth test function. One of * ALWAYS, NEVER, EQUAL, NOT_EQUAL, LESS, LESS_OR_EQUAL, GREATER, * or GREATER_OR_EQUAL. * The default value is LESS_OR_EQUAL. * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * * @since Java 3D 1.4 */ public void setDepthTestFunction(int function){ if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_DEPTH_TEST_FUNCTION_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("RenderingAttributes14")); if (isLive()) ((RenderingAttributesRetained)this.retained).setDepthTestFunction(function); else ((RenderingAttributesRetained)this.retained).initDepthTestFunction(function); }