/** * Sets the shade mode for this ColoringAttributes component object. * @param shadeModel the shade mode to be used; one of FASTEST, * NICEST, SHADE_FLAT, or SHADE_GOURAUD * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public void setShadeModel(int shadeModel) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_SHADE_MODEL_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("ColoringAttributes3")); if (isLive()) ((ColoringAttributesRetained)this.retained).setShadeModel(shadeModel); else ((ColoringAttributesRetained)this.retained).initShadeModel(shadeModel); }
/** * Sets the intrinsic color of this ColoringAttributes * component object. This color is only used for unlit geometry; * if lighting is enabled, then the material colors are used in the * lighting equation to produce the final color. * When vertex colors are present in unlit geometry, those * vertex colors are used in place of this ColoringAttributes color * unless the vertex colors are ignored. * @param color the color that is used when lighting is disabled * or when material is null * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * @see Material * @see RenderingAttributes#setIgnoreVertexColors */ public void setColor(Color3f color) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_COLOR_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("ColoringAttributes0")); if (isLive()) ((ColoringAttributesRetained)this.retained).setColor(color); else ((ColoringAttributesRetained)this.retained).initColor(color); }
/** * Sets the intrinsic color of this ColoringAttributes * component object. This color is only used for unlit geometry; * if lighting is enabled, then the material colors are used in the * lighting equation to produce the final color. * When vertex colors are present in unlit geometry, those * vertex colors are used in place of this ColoringAttributes color * unless the vertex colors are ignored. * @param r the red component of the color * @param g the green component of the color * @param b the blue component of the color * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * @see Material * @see RenderingAttributes#setIgnoreVertexColors */ public void setColor(float r, float g, float b) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_COLOR_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("ColoringAttributes0")); if (isLive()) ((ColoringAttributesRetained)this.retained).setColor(r, g, b); else ((ColoringAttributesRetained)this.retained).initColor(r, g, b); }