2 <h1><a>The Scene Graph and Other jME3 Terminology</a></h1>
7 Before you start making games, make sure you understand general <a href="/com/jme3/gde/docs/jme3/terminology.html">3D Gaming terminology</a>.
11 Second, if you are a beginner, we recommend our <a href="/com/jme3/gde/docs/jme3/scenegraph_for_dummies.html">Scene Graph for Dummies</a> presentation for a visual introduction to the concept of a scene graph.
15 Then continue learning about jME3 concepts here.
19 <!-- EDIT1 SECTION "The Scene Graph and Other jME3 Terminology" [1-396] -->
20 <h2><a>Coordinate System</a></h2>
25 <img src="nbdocs:/com/jme3/gde/docs/jme3/intermediate/coordinate-system.png">
29 The jMonkeyEngine uses a right-handed coordinate system, just as OpenGL does.
33 The coordinate system consists of:
37 <li><div> The origin, a single point in space.</div>
39 <li><div> This point is always at coordinate (0,0,0)</div>
43 <li><div> Three coordinate axes that are mutually perpendicular, and meet in the origin. </div>
45 <li><div> The X axis is "right/left"</div>
47 <li><div> The Y axis is "up/down"</div>
49 <li><div> The Z axis is "towards you/away from you"</div>
57 Every point in 3D space is defined by its (x,y,z) coordinates. The data type for vectors is com.jme3.math.Vector3f.
61 For your orientation, the default camera's location is (0.0f,0.0f,10.0f), and it is looking in the direction described by the unit vector (0.0f, 0.0f, -1.0f). This means your point of view is on the positive side of the Z axis, looking towards the origin, down the Z axis.
65 The unit of meassurement is <code>world unit</code> (wu). Typically, 1 wu is considered to be one meter. All scales, vectors and points are relative to this coordinate system.
69 <!-- EDIT2 SECTION "Coordinate System" [397-1443] -->
70 <h2><a>Scene Graph and RootNode</a></h2>
75 The scene graph represents your 3D world. Objects in the jME3 scene graph are called <a href="/com/jme3/gde/docs/jme3/advanced/spatial.html">Spatial</a>s. Everything attached to the <em>rootNode</em> is part of the scene graph. <em>Attaching</em> a Spatial to the rootNode (or other nodes) adds the Spatial to the scene; <em>detaching</em> removes it.
79 <img src="nbdocs:/com/jme3/gde/docs/jme3/intermediate/scene-graph.png">
83 <!-- EDIT3 SECTION "Scene Graph and RootNode" [1444-1820] -->
84 <h2><a>Spatials: Node vs Geometry</a></h2>
89 A Spatial can be transformed, loaded and saved. There are two types of Spatials, <em>Nodes</em> and <em>Geometries</em>.
94 <td> </td><th> Spatial </th>
97 <th> Purpose: </th><td> A Spatial is an abstract data structure that stores transformations (translation, rotation, scale). </td>
100 <td> </td><th> Geometry </th><th> Node </th>
103 <th> Visibility: </th><td> A visible 3-D object. </td><td> An invisible "handle" for a group of objects. </td>
106 <th> Purpose: </th><td> Represents the "look" of an object: Shape, color, texture, opacity/transparency. </td><td> Groups Geometries and other Nodes together: You transform a Node to affect all attached Nodes. </td>
109 <th> Content: </th><td> Transformations, mesh, material. </td><td> Transformations. No mesh, no material. </td>
112 <th> Examples: </th><td> A box, a sphere, player, a building, a piece of terrain, a vehicle, missiles, NPCs, etc??? </td><td> The rootNode, the guiNode, an audio node, a custom grouping node, etc. </td>
115 <!-- EDIT5 TABLE [1973-2678] -->
117 <!-- EDIT4 SECTION "Spatials: Node vs Geometry" [1821-2679] -->
118 <h2><a>How to Use This Knowledge?</a></h2>
123 Before you start creating your game, you should plan your scene graph: Which Nodes and Geometries will you need? Complete the <a href="/com/jme3/gde/docs/jme3/beginner.html">Hello World tutorial series</a> to learn how to load and create Spatials, how to lay out a scene by attaching, detaching, and transforming Spatials, and how to add interaction and effects to a game.
127 The <a href="/com/jme3/gde/docs/jme3.html">intermediate and advanced documentation</a> gives you more details on how to put all the parts together to create an awesome 3D game in Java!
131 <!-- EDIT6 SECTION "How to Use This Knowledge?" [2680-3212] -->
132 <h2><a>See also</a></h2>
135 <li><div> <a href="/com/jme3/gde/docs/jme3/advanced/spatial.html">Spatial</a> ??? More details about working with Nodes and Geometries</div>
137 <li><div> <a href="/com/jme3/gde/docs/jme3/advanced/traverse_scenegraph.html">Traverse SceneGraph</a> ??? Find any Node or Geometry in the scenegraph.</div>
141 <a href="/wiki/doku.php/tag:spatial?do=showtag&tag=tag%3Aspatial">spatial</a>,
142 <a href="/wiki/doku.php/tag:node?do=showtag&tag=tag%3Anode">node</a>,
143 <a href="/wiki/doku.php/tag:mesh?do=showtag&tag=tag%3Amesh">mesh</a>,
144 <a href="/wiki/doku.php/tag:geometry?do=showtag&tag=tag%3Ageometry">geometry</a>,
145 <a href="/wiki/doku.php/tag:scenegraph?do=showtag&tag=tag%3Ascenegraph">scenegraph</a>,
146 <a href="/wiki/doku.php/tag:rootnode?do=showtag&tag=tag%3Arootnode">rootnode</a>
150 <!-- EDIT7 SECTION "See also" [3213-] -->
151 <p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:the_scene_graph?do=export_xhtmlbody">view online version</a></em></p>