📄 indexedgeometryarray.java
字号:
* @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 * colorIndices 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 color array. * * @exception NullPointerException if the <code>USE_COORD_INDEX_ONLY</code> * bit is set in <code>vertexFormat</code>. */ public void setColorIndices(int index, int colorIndices[]) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_COLOR_INDEX_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray3")); ((IndexedGeometryArrayRetained)this.retained).setColorIndices(index, colorIndices); } /** * Sets the normal index associated with the vertex at * the specified index for this object. * @param index the vertex index * @param normalIndex the new normal 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 normalIndex is out of range. The * normalIndex 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 normal array. * * @exception NullPointerException if the <code>USE_COORD_INDEX_ONLY</code> * bit is set in <code>vertexFormat</code>. */ public void setNormalIndex(int index, int normalIndex) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_NORMAL_INDEX_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray5")); ((IndexedGeometryArrayRetained)this.retained).setNormalIndex(index, normalIndex); } /** * Sets the normal indices associated with the vertices starting at * the specified index for this object. * @param index the vertex index * @param normalIndices an array of normal 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 * normalIndices 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 normal array. * * @exception NullPointerException if the <code>USE_COORD_INDEX_ONLY</code> * bit is set in <code>vertexFormat</code>. */ public void setNormalIndices(int index, int normalIndices[]) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_NORMAL_INDEX_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray5")); ((IndexedGeometryArrayRetained)this.retained).setNormalIndices(index, normalIndices); } /** * @deprecated As of Java 3D version 1.2, replaced by * <code>setTextureCoordinateIndex(int texCoordSet, ...)</code> */ public void setTextureCoordinateIndex(int index, int texCoordIndex) { setTextureCoordinateIndex(0, index, texCoordIndex); } /** * Sets the texture coordinate index associated with the vertex at * the specified index in the specified texture coordinate set * for this object. * * @param texCoordSet texture coordinate set in this geometry array * @param index the vertex index * @param texCoordIndex the new texture coordinate index * * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * * @exception ArrayIndexOutOfBoundsException if neither of the * <code>TEXTURE_COORDINATE</code> bits are set in the * <code>vertexFormat</code> or if the index or * texCoordSet is out of range. * * @exception ArrayIndexOutOfBoundsException if index is in the range * <code>[initialIndexIndex, initialIndexIndex+validIndexCount-1]</code> * and the specified texCoordIndex is out of range. The * texCoordIndex 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 texture coordinate array. * * @exception NullPointerException if the <code>USE_COORD_INDEX_ONLY</code> * bit is set in <code>vertexFormat</code>. * * @since Java 3D 1.2 */ public void setTextureCoordinateIndex(int texCoordSet, int index, int texCoordIndex) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_TEXCOORD_INDEX_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray7")); ((IndexedGeometryArrayRetained)this.retained).setTextureCoordinateIndex(texCoordSet, index, texCoordIndex); } /** * @deprecated As of Java 3D version 1.2, replaced by * <code>setTextureCoordinateIndices(int texCoordSet, ...)</code> */ public void setTextureCoordinateIndices(int index, int texCoordIndices[]) { setTextureCoordinateIndices(0, index, texCoordIndices); } /** * Sets the texture coordinate indices associated with the vertices * starting at the specified index in the specified texture coordinate set * for this object. * * @param texCoordSet texture coordinate set in this geometry array * @param index the vertex index * @param texCoordIndices an array of texture coordinate indices * * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * * @exception ArrayIndexOutOfBoundsException if neither of the * <code>TEXTURE_COORDINATE</code> bits are set in the * <code>vertexFormat</code> or if the index or * texCoordSet is out of range. * * @exception ArrayIndexOutOfBoundsException if any element of the * texCoordIndices 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 texture coordinate array. * * @exception NullPointerException if the <code>USE_COORD_INDEX_ONLY</code> * bit is set in <code>vertexFormat</code>. * * @since Java 3D 1.2 */ public void setTextureCoordinateIndices(int texCoordSet, int index, int texCoordIndices[]) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_TEXCOORD_INDEX_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray7")); ((IndexedGeometryArrayRetained)this.retained).setTextureCoordinateIndices(texCoordSet, index, texCoordIndices); } /** * Sets the vertex attribute index associated with the vertex at * the specified index for the specified vertex attribute number * for this object. * * @param vertexAttrNum vertex attribute number in this geometry array * @param index the vertex index * @param vertexAttrIndex the new vertex attribute index * * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * * @exception ArrayIndexOutOfBoundsException if the index or * vertexAttrNum is out of range. * * @exception ArrayIndexOutOfBoundsException if index is in the range * <code>[initialIndexIndex, initialIndexIndex+validIndexCount-1]</code> * and the specified vertexAttrIndex is out of range. The * vertexAttrIndex 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 vertex attribute array. * * @exception NullPointerException if the <code>USE_COORD_INDEX_ONLY</code> * bit is set in <code>vertexFormat</code>. * * @since Java 3D 1.4 */ public void setVertexAttrIndex(int vertexAttrNum, int index, int vertexAttrIndex) { if (isLiveOrCompiled()) { if(!this.getCapability(ALLOW_VERTEX_ATTR_INDEX_WRITE)) { throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray28")); } } ((IndexedGeometryArrayRetained)this.retained).setVertexAttrIndex(vertexAttrNum, index, vertexAttrIndex); } /** * Sets the vertex attribute indices associated with the vertices * starting at the specified index for the specified vertex attribute number * for this object. * * @param vertexAttrNum vertex attribute number in this geometry array * @param index the vertex index * @param vertexAttrIndices an array of vertex attribute indices * * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * * @exception ArrayIndexOutOfBoundsException if the index or * vertexAttrNum is out of range. * * @exception ArrayIndexOutOfBoundsException if any element of the * vertexAttrIndices 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 vertex attribute array. * * @exception NullPointerException if the <code>USE_COORD_INDEX_ONLY</code> * bit is set in <code>vertexFormat</code>. * * @since Java 3D 1.4 */ public void setVertexAttrIndices(int vertexAttrNum, int index, int[] vertexAttrIndices) { if (isLiveOrCompiled()) { if(!this.getCapability(ALLOW_VERTEX_ATTR_INDEX_WRITE)) { throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray28")); } } ((IndexedGeometryArrayRetained)this.retained).setVertexAttrIndices(vertexAttrNum, index, vertexAttrIndices); } //NVaidya /** * Retrieves the coordinate index associated with the vertex at * the specified index for this object. * @param index the vertex index * @return the coordinate index * @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 <code>BY_REFERENCE_INDICES</code>. */ public int getCoordinateIndex(int index) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_COORDINATE_INDEX_READ)) throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray9")); //NVaidya int format = ((IndexedGeometryArrayRetained)this.retained).vertexFormat; if ((format & BY_REFERENCE_INDICES) != 0) throw new IllegalStateException(J3dI18N.getString("IndexedGeometryArray31")); return ((IndexedGeometryArrayRetained)this.retained).getCoordinateIndex(index); } //NVaidya /** * Retrieves the coordinate indices associated with the vertices starting at * the specified index for this object. * @param index the vertex index * @param coordinateIndices array that will receive the coordinate indices * @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 <code>BY_REFERENCE_INDICES</code>. */ public void getCoordinateIndices(int index, int coordinateIndices[]) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_COORDINATE_INDEX_READ)) throw new CapabilityNotSetException(J3dI18N.getString("IndexedGeometryArray9")); //NVaidya int format = ((IndexedGeometryArrayRetained)this.retained).vertexFormat; if ((format & BY_REFERENCE_INDICES) != 0) throw new IllegalStateException(J3dI18N.getString("IndexedGeometryArray31")); ((IndexedGeometryArrayRetained)this.retained).getCoordinateIndices(index, coordinateIndices); } //NVaidya /** * Returns a reference to the coordinate indices associated with * the vertices * @return the coordinate indices array * @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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -