/** * Retrieves the array of texture unit state objects from this * Appearance object. A shallow copy of the array of references to * the TextureUnitState objects is returned. * * @return the array of texture unit state objects * * @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 TextureUnitState[] getTextureUnitState() { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_TEXTURE_UNIT_STATE_READ)) throw new CapabilityNotSetException(J3dI18N.getString("Appearance21")); return ((AppearanceRetained)this.retained).getTextureUnitState(); }
/** * Retrieves the texture unit state object at the specified * index within the texture unit state array. The index must be * within the range <code>[0, stateArray.length-1]</code>. * * @param index the array index of the object to be retrieved * * @return the texture unit state object at the specified index * * @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 TextureUnitState getTextureUnitState(int index) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_TEXTURE_UNIT_STATE_READ)) throw new CapabilityNotSetException(J3dI18N.getString("Appearance21")); return ((AppearanceRetained)this.retained).getTextureUnitState(index); }
hashtable)); TextureUnitState state[] = app.getTextureUnitState(); if (state != null) { rt.setTextureUnitState(state);