📄 world.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Nov 27 13:54:36 EET 2003 -->
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>
World (Mobile 3D Graphics API (M3G))
</TITLE>
<META NAME="keywords" CONTENT="javax.microedition.m3g.World,World class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="World (Mobile 3D Graphics API (M3G))";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<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="class-use/World.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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-files/index-1.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><B>Nov 19, 2003</B></EM></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../javax/microedition/m3g/VertexBuffer.html"><B>PREV CLASS</B></A>
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="World.html" TARGET="_top"><B>NO FRAMES</B></A>
<SCRIPT> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT><A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A></NOSCRIPT></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#fields_inherited_from_class_javax.microedition.m3g.Node">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.microedition.m3g</FONT>
<BR>
Class World</H2>
<PRE>
java.lang.Object
|
+--<A HREF="../../../javax/microedition/m3g/Object3D.html">javax.microedition.m3g.Object3D</A>
|
+--<A HREF="../../../javax/microedition/m3g/Transformable.html">javax.microedition.m3g.Transformable</A>
|
+--<A HREF="../../../javax/microedition/m3g/Node.html">javax.microedition.m3g.Node</A>
|
+--<A HREF="../../../javax/microedition/m3g/Group.html">javax.microedition.m3g.Group</A>
|
+--<B>javax.microedition.m3g.World</B>
</PRE>
<HR>
<DL>
<DT>public class <B>World</B><DT>extends <A HREF="../../../javax/microedition/m3g/Group.html">Group</A></DL>
<P>
<p>A special Group node that is a top-level container for scene graphs.</p><p>A scene graph is constructed from a hierarchy of nodes. In acomplete scene graph, all nodes are ultimately connected to each othervia a common root, which is a World node. An example of a completescene graph is shown in the figure below.</p><center><img src="./doc-files/World-scenegraph.png"/></center><p>Note that a scene graph need not be complete in order to be rendered;individual nodes and branches can be rendered using a separate methodin Graphics3D. However, the semantics of rendering an incomplete scenegraph are slightly different compared to rendering a World; see Graphics3Dfor more information.</p><p>Despite that it is called a graph, the scene graph is actually atree structure. This implies that a node can belong to at most onegroup at a time, and cycles are prohibited. However, componentobjects, such as VertexArrays, may be referenced by an arbitrarynumber of nodes and components. The basic rules for building validscene graphs are summarized below.</p><center><img src="./doc-files/World-rules.png"/></center><p>Even though World is a scene graph node, its special role as thesingular root node has two noteworthy consequences. Firstly, a Worldcan not be a child of any Node. Secondly, the node transformation isignored for World objects when rendering. In all other respects (get,set, animate), the transformation behaves just like any other nodetransformation. Note also that there is no conceptual "Universe"coordinate system above the World, contrary to some other scene graphAPIs.</p><p>The method <A HREF="../../../javax/microedition/m3g/Graphics3D.html#render(javax.microedition.m3g.World)"><CODE>render(World)</CODE></A> inGraphics3D renders a World as observed by the currently active cameraof that world. If the active camera is null, or the camera is not inthe world, an exception is thrown. The world can still be renderedwith the <A HREF="../../../javax/microedition/m3g/Graphics3D.html#render(javax.microedition.m3g.Node, javax.microedition.m3g.Transform)"><CODE>render(Node,Transform)</CODE></A> method by treating the World as a Group. In that case,however, the application must explicitly clear the background andset up the camera and lights prior to rendering.</p>
<P>
<P>
<DL>
<DT><B>See Also:</B><DD><a href="../../../file-format.html#World">Binary format</a></DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
</TABLE>
<A NAME="fields_inherited_from_class_javax.microedition.m3g.Node"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from class javax.microedition.m3g.<A HREF="../../../javax/microedition/m3g/Node.html">Node</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/microedition/m3g/Node.html#NONE">NONE</A>, <A HREF="../../../javax/microedition/m3g/Node.html#ORIGIN">ORIGIN</A>, <A HREF="../../../javax/microedition/m3g/Node.html#X_AXIS">X_AXIS</A>, <A HREF="../../../javax/microedition/m3g/Node.html#Y_AXIS">Y_AXIS</A>, <A HREF="../../../javax/microedition/m3g/Node.html#Z_AXIS">Z_AXIS</A></CODE></TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/World.html#World()">World</A></B>()</CODE>
<BR>
Creates an empty World with default values. </TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../javax/microedition/m3g/Camera.html">Camera</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/World.html#getActiveCamera()">getActiveCamera</A></B>()</CODE>
<BR>
Gets the currently active camera.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../javax/microedition/m3g/Background.html">Background</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/World.html#getBackground()">getBackground</A></B>()</CODE>
<BR>
Retrieves the background settings of this World.</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="../../../javax/microedition/m3g/World.html#setActiveCamera(javax.microedition.m3g.Camera)">setActiveCamera</A></B>(<A HREF="../../../javax/microedition/m3g/Camera.html">Camera</A> camera)</CODE>
<BR>
Sets the Camera to use when rendering this World. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -