📄 scenegraphio.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_06) on Wed Dec 13 16:20:13 PST 2006 --><TITLE>SceneGraphIO (Java 3D 1.5.0)</TITLE><META NAME="keywords" CONTENT="com.sun.j3d.utils.scenegraph.io.SceneGraphIO interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="SceneGraphIO (Java 3D 1.5.0)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/SceneGraphFileWriter.html" title="class in com.sun.j3d.utils.scenegraph.io"><B>PREV CLASS</B></A> <A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/SceneGraphObjectReferenceControl.html" title="interface in com.sun.j3d.utils.scenegraph.io"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?com/sun/j3d/utils/scenegraph/io/SceneGraphIO.html" target="_top"><B>FRAMES</B></A> <A HREF="SceneGraphIO.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">com.sun.j3d.utils.scenegraph.io</FONT><BR>Interface SceneGraphIO</H2><HR><DL><DT><PRE>public interface <B>SceneGraphIO</B></DL></PRE><P>Implement this interface in any classes that subclass a Java3D SceneGraphObject in order to have your class handled correctly by scenegraph.io. More information and example code is provided <A href="doc-files/extensibility.html">here.</a> Classes that implement this interface MUST have a no-arg constructor<P><P><HR><P><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/SceneGraphIO.html#createSceneGraphObjectReferences(com.sun.j3d.utils.scenegraph.io.SceneGraphObjectReferenceControl)">createSceneGraphObjectReferences</A></B>(<A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/SceneGraphObjectReferenceControl.html" title="interface in com.sun.j3d.utils.scenegraph.io">SceneGraphObjectReferenceControl</A> ref)</CODE><BR> The method is called before writeSGObject and gives the user the chance to create references to other Nodes and NodeComponents.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/SceneGraphIO.html#readSceneGraphObject(java.io.DataInput)">readSceneGraphObject</A></B>(java.io.DataInput in)</CODE><BR> This is called after the object has been constructed and the superclass SceneGraphObject data has been read from <code>in</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/SceneGraphIO.html#restoreSceneGraphObjectReferences(com.sun.j3d.utils.scenegraph.io.SceneGraphObjectReferenceControl)">restoreSceneGraphObjectReferences</A></B>(<A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/SceneGraphObjectReferenceControl.html" title="interface in com.sun.j3d.utils.scenegraph.io">SceneGraphObjectReferenceControl</A> ref)</CODE><BR> Within this method the user should restore references to the SceneGraphObjects whose nodeID's were created with createSceneGraphObjectReferences This method is called once the all objects in the scenegraph have been loaded.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/SceneGraphIO.html#saveChildren()">saveChildren</A></B>()</CODE><BR> Flag indicating for children of this object should be saved This method only has an effect if this is a subclass of Group.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/SceneGraphIO.html#writeSceneGraphObject(java.io.DataOutput)">writeSceneGraphObject</A></B>(java.io.DataOutput out)</CODE><BR> This method should store all the local state of the object and any references to other SceneGraphObjects into <code>out</code>.</TD></TR></TABLE> <P><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="createSceneGraphObjectReferences(com.sun.j3d.utils.scenegraph.io.SceneGraphObjectReferenceControl)"><!-- --></A><H3>createSceneGraphObjectReferences</H3><PRE>void <B>createSceneGraphObjectReferences</B>(<A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/SceneGraphObjectReferenceControl.html" title="interface in com.sun.j3d.utils.scenegraph.io">SceneGraphObjectReferenceControl</A> ref)</PRE><DL><DD>The method is called before writeSGObject and gives the user the chance to create references to other Nodes and NodeComponents. References take the form of a nodeID, of type integer. Every SceneGraphObject is assigned a unique ID. The user must save the reference information in writeSGObject<P><DD><DL><DT><B>Parameters:</B><DD><CODE>ref</CODE> - provides methods to create references to a SceneGraphObject</DL></DD></DL><HR><A NAME="restoreSceneGraphObjectReferences(com.sun.j3d.utils.scenegraph.io.SceneGraphObjectReferenceControl)"><!-- --></A><H3>restoreSceneGraphObjectReferences</H3><PRE>void <B>restoreSceneGraphObjectReferences</B>(<A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/SceneGraphObjectReferenceControl.html" title="interface in com.sun.j3d.utils.scenegraph.io">SceneGraphObjectReferenceControl</A> ref)</PRE><DL><DD>Within this method the user should restore references to the SceneGraphObjects whose nodeID's were created with createSceneGraphObjectReferences This method is called once the all objects in the scenegraph have been loaded.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>ref</CODE> - provides methods to resolve references to a SceneGraphObject</DL></DD></DL><HR><A NAME="writeSceneGraphObject(java.io.DataOutput)"><!-- --></A><H3>writeSceneGraphObject</H3><PRE>void <B>writeSceneGraphObject</B>(java.io.DataOutput out) throws java.io.IOException</PRE><DL><DD>This method should store all the local state of the object and any references to other SceneGraphObjects into <code>out</code>. This is called after data for the parent SceneGraphObject has been written to the <code>out</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>out</CODE> - the output stream<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="readSceneGraphObject(java.io.DataInput)"><!-- --></A><H3>readSceneGraphObject</H3><PRE>void <B>readSceneGraphObject</B>(java.io.DataInput in) throws java.io.IOException</PRE><DL><DD>This is called after the object has been constructed and the superclass SceneGraphObject data has been read from <code>in</code>. The user should restore all state infomation written in writeSGObject<P><DD><DL><DT><B>Parameters:</B><DD><CODE>in</CODE> - the input stream<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE></DL></DD></DL><HR><A NAME="saveChildren()"><!-- --></A><H3>saveChildren</H3><PRE>boolean <B>saveChildren</B>()</PRE><DL><DD>Flag indicating for children of this object should be saved This method only has an effect if this is a subclass of Group. If this returns true then all children of this Group will be saved. If it returns false then the children are not saved.<P><DD><DL></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/SceneGraphFileWriter.html" title="class in com.sun.j3d.utils.scenegraph.io"><B>PREV CLASS</B></A> <A HREF="../../../../../../com/sun/j3d/utils/scenegraph/io/SceneGraphObjectReferenceControl.html" title="interface in com.sun.j3d.utils.scenegraph.io"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?com/sun/j3d/utils/scenegraph/io/SceneGraphIO.html" target="_top"><B>FRAMES</B></A> <A HREF="SceneGraphIO.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1">Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="../../../../../../LICENSE-SPEC.html">license terms</a>.</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -