📄 shape3d.html
字号:
<P></DL><HR><A NAME="Shape3D(javax.media.j3d.Geometry)"><!-- --></A><H3>Shape3D</H3><PRE>public <B>Shape3D</B>(<A HREF="../../../javax/media/j3d/Geometry.html">Geometry</A> geometry)</PRE><DL><DD>Constructs and initializes a Shape3D node with the specified geometry component and a null appearance component. The list of geometry components is initialized with the specified geometry component as the single element with an index of 0. A null appearance component specifies that default values are used for all appearance attributes.<P><DT><B>Parameters:</B><DD><CODE>geometry</CODE> - the geometry component with which to initialize this shape node.</DL><HR><A NAME="Shape3D(javax.media.j3d.Geometry, javax.media.j3d.Appearance)"><!-- --></A><H3>Shape3D</H3><PRE>public <B>Shape3D</B>(<A HREF="../../../javax/media/j3d/Geometry.html">Geometry</A> geometry, <A HREF="../../../javax/media/j3d/Appearance.html">Appearance</A> appearance)</PRE><DL><DD>Constructs and initializes a Shape3D node with the specified geometry and appearance components. The list of geometry components is initialized with the specified geometry component as the single element with an index of 0.<P><DT><B>Parameters:</B><DD><CODE>geometry</CODE> - the geometry component with which to initialize this shape node<DD><CODE>appearance</CODE> - the appearance component of the shape node</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="setCollisionBounds(javax.media.j3d.Bounds)"><!-- --></A><H3>setCollisionBounds</H3><PRE>public void <B>setCollisionBounds</B>(<A HREF="../../../javax/media/j3d/Bounds.html">Bounds</A> bounds)</PRE><DL><DD>Sets the collision bounds of a node.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>bounds</CODE> - the collision bounding object for a node<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph</DL></DD></DL><HR><A NAME="getCollisionBounds()"><!-- --></A><H3>getCollisionBounds</H3><PRE>public <A HREF="../../../javax/media/j3d/Bounds.html">Bounds</A> <B>getCollisionBounds</B>()</PRE><DL><DD>Returns the collision bounding object of this node.<P><DD><DL><DT><B>Returns:</B><DD>the node's collision bounding object<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph</DL></DD></DL><HR><A NAME="setGeometry(javax.media.j3d.Geometry)"><!-- --></A><H3>setGeometry</H3><PRE>public void <B>setGeometry</B>(<A HREF="../../../javax/media/j3d/Geometry.html">Geometry</A> geometry)</PRE><DL><DD>Replaces the geometry component at index 0 in this Shape3D node's list of geometry components with the specified geometry component. If there are existing geometry components in the list (besides the one being replaced), the new geometry component must be of the same equivalence class (point, line, polygon, CompressedGeometry, Raster, Text3D) as the others.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>geometry</CODE> - the geometry component to be stored at index 0.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the new geometry component is not of of the same equivalence class as the existing geometry components.<DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph</DL></DD></DL><HR><A NAME="getGeometry()"><!-- --></A><H3>getGeometry</H3><PRE>public <A HREF="../../../javax/media/j3d/Geometry.html">Geometry</A> <B>getGeometry</B>()</PRE><DL><DD>Retrieves the geometry component at index 0 from this Shape3D node's list of geometry components.<P><DD><DL><DT><B>Returns:</B><DD>the geometry component at index 0.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph</DL></DD></DL><HR><A NAME="setGeometry(javax.media.j3d.Geometry, int)"><!-- --></A><H3>setGeometry</H3><PRE>public void <B>setGeometry</B>(<A HREF="../../../javax/media/j3d/Geometry.html">Geometry</A> geometry, int index)</PRE><DL><DD>Replaces the geometry component at the specified index in this Shape3D node's list of geometry components with the specified geometry component. If there are existing geometry components in the list (besides the one being replaced), the new geometry component must be of the same equivalence class (point, line, polygon, CompressedGeometry, Raster, Text3D) as the others.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>geometry</CODE> - the geometry component to be stored at the specified index.<DD><CODE>index</CODE> - the index of the geometry component to be replaced.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the new geometry component is not of of the same equivalence class as the existing geometry components.<DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DT><B>Since:</B><DD>Java 3D 1.2</DD></DD></DL></DD></DL><HR><A NAME="getGeometry(int)"><!-- --></A><H3>getGeometry</H3><PRE>public <A HREF="../../../javax/media/j3d/Geometry.html">Geometry</A> <B>getGeometry</B>(int index)</PRE><DL><DD>Retrieves the geometry component at the specified index from this Shape3D node's list of geometry components.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the geometry component to be returned.<DT><B>Returns:</B><DD>the geometry component at the specified index.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DT><B>Since:</B><DD>Java 3D 1.2</DD></DD></DL></DD></DL><HR><A NAME="insertGeometry(javax.media.j3d.Geometry, int)"><!-- --></A><H3>insertGeometry</H3><PRE>public void <B>insertGeometry</B>(<A HREF="../../../javax/media/j3d/Geometry.html">Geometry</A> geometry, int index)</PRE><DL><DD>Inserts the specified geometry component into this Shape3D node's list of geometry components at the specified index. If there are existing geometry components in the list, the new geometry component must be of the same equivalence class (point, line, polygon, CompressedGeometry, Raster, Text3D) as the others.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>geometry</CODE> - the geometry component to be inserted at the specified index.<DD><CODE>index</CODE> - the index at which the geometry component is inserted.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the new geometry component is not of of the same equivalence class as the existing geometry components.<DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DT><B>Since:</B><DD>Java 3D 1.2</DD></DD></DL></DD></DL><HR><A NAME="removeGeometry(int)"><!-- --></A><H3>removeGeometry</H3><PRE>public void <B>removeGeometry</B>(int index)</PRE><DL><DD>Removes the geometry component at the specified index from this Shape3D node's list of geometry components.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the geometry component to be removed.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DT><B>Since:</B><DD>Java 3D 1.2</DD></DD></DL></DD></DL><HR><A NAME="getAllGeometries()"><!-- --></A><H3>getAllGeometries</H3><PRE>public java.util.Enumeration <B>getAllGeometries</B>()</PRE><DL><DD>Returns an enumeration of this Shape3D node's list of geometry components.<P><DD><DL><DT><B>Returns:</B><DD>an Enumeration object containing all geometry components in this Shape3D node's list of geometry components.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DT><B>Since:</B><DD>Java 3D 1.2</DD></DD></DL></DD></DL><HR><A NAME="addGeometry(javax.media.j3d.Geometry)"><!-- --></A><H3>addGeometry</H3><PRE>public void <B>addGeometry</B>(<A HREF="../../../javax/media/j3d/Geometry.html">Geometry</A> geometry)</PRE><DL><DD>Appends the specified geometry component to this Shape3D node's list of geometry components. If there are existing geometry components in the list, the new geometry component must be of the same equivalence class (point, line, polygon, CompressedGeometry, Raster, Text3D) as the others.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>geometry</CODE> - the geometry component to be appended.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the new geometry component is not of of the same equivalence class as the existing geometry components.<DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DT><B>Since:</B><DD>Java 3D 1.2</DD></DD></DL></DD></DL><HR><A NAME="numGeometries()"><!-- --></A><H3>numGeometries</H3><PRE>public int <B>numGeometries</B>()</PRE><DL><DD>Returns the number of geometry components in this Shape3D node's list of geometry components.<P><DD><DL><DT><B>Returns:</B><DD>the number of geometry components in this Shape3D node's list of geometry components.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DT><B>Since:</B><DD>Java 3D 1.2</DD></DD></DL></DD></DL><HR><A NAME="indexOfGeometry(javax.media.j3d.Geometry)"><!-- --></A><H3>indexOfGeometry</H3><PRE>public int <B>indexOfGeometry</B>(<A HREF="../../../javax/media/j3d/Geometry.html">Geometry</A> geometry)</PRE><DL><DD>Retrieves the index of the specified geometry component in this Shape3D node's list of geometry components.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>geometry</CODE> - the geometry component to be looked up.<DT><B>Returns:</B><DD>the index of the specified geometry component; returns -1 if the object is not in the list.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DT><B>Since:</B><DD>Java 3D 1.3</DD></DD></DL></DD></DL><HR><A NAME="removeGeometry(javax.media.j3d.Geometry)"><!-- --></A><H3>removeGeometry</H3><PRE>public void <B>removeGeometry</B>(<A HREF="../../../javax/media/j3d/Geometry.html">Geometry</A> geometry)</PRE><DL><DD>Removes the specified geometry component from this Shape3D node's list of geometry components. If the specified object is not in the list, the list is not modified.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>geometry</CODE> - the geometry component to be removed.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DT><B>Since:</B><DD>Java 3D 1.3</DD></DD></DL></DD></DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -