⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 indexedgeometryarray.java

📁 JAVA3D矩陈的相关类
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
    public int getValidIndexCount() {	if (isLiveOrCompiled())	    if(!this.getCapability(ALLOW_COUNT_READ))		throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray17"));	return ((IndexedGeometryArrayRetained)this.retained).getValidIndexCount();    }    /**     * Sets the initial index index for this IndexedGeometryArray object.     * This index specifies the first index within this indexed geometry     * array that is actually used in rendering or other operations     * such as picking and collision.  This attribute is initialized     * to 0.     *     * @param initialIndexIndex the new initial index index.     * @exception CapabilityNotSetException if the appropriate capability is     * not set and this object is part of a live or compiled scene graph     * @exception IllegalArgumentException if either of the following is true:     * <ul>     * <code>initialIndexIndex < 0</code>, or<br>     * <code>initialIndexIndex + validIndexCount > indexCount</code><br>     * </ul>     *     * @exception ArrayIndexOutOfBoundsException if any element in the range     * <code>[initialIndexIndex, initialIndexIndex+validIndexCount-1]</code>     * in the index array associated with any of the enabled vertex     * components (coord, color, normal, texcoord) is out of range.     * An element is out of range if it is less than 0 or is greater     * than or equal to the number of vertices actually defined for     * the particular component's array.     *     * @exception ArrayIndexOutOfBoundsException if the data mode for this geometry     * array object is <code>BY_REFERENCE_INDICES</code> and     * <code>coordIndices.length &lt; (initialIndexIndex + validIndexCount)</code>.     *     * @since Java 3D 1.3     */    public void setInitialIndexIndex(int initialIndexIndex) {	if (isLiveOrCompiled())	    if(!this.getCapability(ALLOW_COUNT_WRITE))		throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray18"));        if (initialIndexIndex < 0)	    throw new IllegalArgumentException(J3dI18N.getString("IndexedGeometryArray20"));	((IndexedGeometryArrayRetained)this.retained).setInitialIndexIndex(initialIndexIndex);    }    /**     * Gets the initial index index for this IndexedGeometryArray object.     * @return the current initial index index     * @exception CapabilityNotSetException if the appropriate capability is     * not set and this object is part of a live or compiled scene graph     *     * @since Java 3D 1.3     */    public int getInitialIndexIndex() {	if (isLiveOrCompiled())	    if(!this.getCapability(ALLOW_COUNT_READ))		throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray19"));     return ((IndexedGeometryArrayRetained)this.retained).getInitialIndexIndex();    }    /**     * This method is not supported for indexed geometry arrays.     * Indexed primitives use an array of indices to determine how     * to access the vertex array.     * The initialIndexIndex attribute can be used to set the starting     * index within the index arrays.     *     * @exception UnsupportedOperationException this method is not supported     *     * @since Java 3D 1.3     */    public void setInitialVertexIndex(int initialVertexIndex) {	throw new UnsupportedOperationException();    }    /**     * This method is not supported for indexed geometry arrays.     * Indexed primitives use an array of indices to determine how     * to access the vertex array.     *     * @exception UnsupportedOperationException this method is not supported     *     * @since Java 3D 1.3     */    public void setInitialCoordIndex(int initialCoordIndex) {	throw new UnsupportedOperationException();    }    /**     * This method is not supported for indexed geometry arrays.     * Indexed primitives use an array of indices to determine how     * to access the vertex array.     *     * @exception UnsupportedOperationException this method is not supported     *     * @since Java 3D 1.3     */    public void setInitialColorIndex(int initialColorIndex) {	throw new UnsupportedOperationException();    }    /**     * This method is not supported for indexed geometry arrays.     * Indexed primitives use an array of indices to determine how     * to access the vertex array.     *     * @exception UnsupportedOperationException this method is not supported     *     * @since Java 3D 1.3     */    public void setInitialNormalIndex(int initialNormalIndex) {	throw new UnsupportedOperationException();    }    /**     * This method is not supported for indexed geometry arrays.     * Indexed primitives use an array of indices to determine how     * to access the vertex array.     *     * @exception UnsupportedOperationException this method is not supported     *     * @since Java 3D 1.3     */    public void setInitialTexCoordIndex(int texCoordSet,					int initialTexCoordIndex) {	throw new UnsupportedOperationException();    }    /**     * This method is not supported for indexed geometry arrays.     * Indexed primitives use an array of indices to determine how     * to access the vertex array.     *     * @exception UnsupportedOperationException this method is not supported     *     * @since Java 3D 1.4     */    public void setInitialVertexAttrIndex(int vertexAttrNum,					  int initialVertexAttrIndex) {        throw new UnsupportedOperationException();    }    /**     * This method is not supported for indexed geometry arrays.     * Indexed primitives use an array of indices to determine how     * to access the vertex array.     * The validIndexCount attribute can be used to set the number of     * valid indexed vertices rendered.     *     * @exception UnsupportedOperationException this method is not supported     *     * @since Java 3D 1.3     */    public void setValidVertexCount(int validVertexCount) {	throw new UnsupportedOperationException();    }    //NVaidya    /**     * Sets the coordinate index associated with the vertex at     * the specified index for this object.     * @param index the vertex index     * @param coordinateIndex the new coordinate index     *     * @exception CapabilityNotSetException if appropriate capability is     * not set and this object is part of live or compiled scene graph     *     * @exception ArrayIndexOutOfBoundsException if index is less than 0     * or is greater than or equal to indexCount     *     * @exception ArrayIndexOutOfBoundsException if index is in the range     * <code>[initialIndexIndex, initialIndexIndex+validIndexCount-1]</code>     * and the specified coordinateIndex is out of range.  The     * coordinateIndex is out of range if it is less than 0 or is     * greater than or equal to the number of vertices actually     * defined for the coordinate array.     *     * @exception IllegalStateException if the data mode for this geometry     * array object is <code>BY_REFERENCE_INDICES</code>.     */  public void setCoordinateIndex(int index, int coordinateIndex) {    if (isLiveOrCompiled())    if(!this.getCapability(ALLOW_COORDINATE_INDEX_WRITE))      throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray1"));    //NVaidya    int format = ((IndexedGeometryArrayRetained)this.retained).vertexFormat;    if ((format & BY_REFERENCE_INDICES) != 0)      throw new IllegalStateException(J3dI18N.getString("IndexedGeometryArray31"));      ((IndexedGeometryArrayRetained)this.retained).setCoordinateIndex(index, coordinateIndex);  }    //NVaidya    /**     * Sets the coordinate indices associated with the vertices starting at     * the specified index for this object.     * @param index the vertex index     * @param coordinateIndices an array of coordinate indices     *     * @exception CapabilityNotSetException if appropriate capability is     * not set and this object is part of live or compiled scene graph     *     * @exception ArrayIndexOutOfBoundsException if index is less than 0     * or is greater than or equal to indexCount     *     * @exception ArrayIndexOutOfBoundsException if any element of the     * coordinateIndices array whose destination position is in the range     * <code>[initialIndexIndex, initialIndexIndex+validIndexCount-1]</code>     * is out of range.  An element is out of range if it is less than 0     * or is greater than or equal to the number of vertices actually     * defined for the coordinate array.     *     * @exception IllegalStateException if the data mode for this geometry     * array object is <code>BY_REFERENCE_INDICES</code>.     */  public void setCoordinateIndices(int index, int coordinateIndices[]) {    if (isLiveOrCompiled())	if(!this.getCapability(ALLOW_COORDINATE_INDEX_WRITE))	    throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray1"));    //NVaidya    int format = ((IndexedGeometryArrayRetained)this.retained).vertexFormat;    if ((format & BY_REFERENCE_INDICES) != 0)      throw new IllegalStateException(J3dI18N.getString("IndexedGeometryArray31"));      ((IndexedGeometryArrayRetained)this.retained).setCoordinateIndices(index, coordinateIndices);  }    //NVaidya    /**     * Sets the coordinate indices array reference to the specified array.     * If the coordinate indices array reference is null, the entire     * geometry array object is treated as if it were null--any     * Shape3D or Morph node that uses this geometry array will not be drawn.     *     * @param coordIndices an array of indices to which a reference     * will be set.     *     * @exception CapabilityNotSetException if appropriate capability is     * not set and this object is part of live or compiled scene graph     *     * @exception IllegalStateException if the data mode for this geometry     * array object is not <code>BY_REFERENCE_INDICES</code>.     *     * @exception ArrayIndexOutOfBoundsException if any element of the     * coordIndices array whose destination position is in the range     * <code>[initialIndexIndex, initialIndexIndex+validIndexCount-1]</code>     * is out of range.  An element is out of range if it is less than 0     * or is greater than or equal to the number of vertices actually     * defined for the coordinate array.     *     * @exception ArrayIndexOutOfBoundsException if     * <code>coordIndices.length &lt; (initialIndexIndex + validIndexCount)</code>.     *     * @since Java 3D 1.5     */    public void setCoordIndicesRef(int coordIndices[]) {        if (isLiveOrCompiled())            if (!this.getCapability(ALLOW_REF_DATA_WRITE))                throw new CapabilityNotSetException(J3dI18N.getString("GeometryArray86"));        //NVaidya        int format = ((IndexedGeometryArrayRetained)this.retained).vertexFormat;        if ((format & BY_REFERENCE_INDICES) == 0)            throw new IllegalStateException(J3dI18N.getString("IndexedGeometryArray32"));        ((IndexedGeometryArrayRetained)this.retained).setCoordIndicesRef(coordIndices);    }    /**     * Sets the color index associated with the vertex at     * the specified index for this object.     * @param index the vertex index     * @param colorIndex the new color index     *     * @exception CapabilityNotSetException if appropriate capability is     * not set and this object is part of live or compiled scene graph     *     * @exception ArrayIndexOutOfBoundsException if index is less than 0     * or is greater than or equal to indexCount     *     * @exception ArrayIndexOutOfBoundsException if index is in the range     * <code>[initialIndexIndex, initialIndexIndex+validIndexCount-1]</code>     * and the specified colorIndex is out of range.  The     * colorIndex is out of range if it is less than 0 or is     * greater than or equal to the number of vertices actually     * defined for the color array.     *     * @exception NullPointerException if the <code>USE_COORD_INDEX_ONLY</code>     * bit is set in <code>vertexFormat</code>.     */  public void setColorIndex(int index, int colorIndex) {    if (isLiveOrCompiled())    if(!this.getCapability(ALLOW_COLOR_INDEX_WRITE))      throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray3"));      ((IndexedGeometryArrayRetained)this.retained).setColorIndex(index, colorIndex);  }    /**     * Sets the color indices associated with the vertices starting at     * the specified index for this object.     * @param index the vertex index     * @param colorIndices an array of color indices     *

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -