|
|
@@ -22,7 +22,7 @@ In your Java code, a Spatial is either an instance of `com.jme3.scene.Node` or a
|
|
|
|
|
|
image::jme3/intermediate/scene-graph.png[scene-graph.png,with="",height="",align="center"]
|
|
|
|
|
|
-[cols="3", options="header"]
|
|
|
+[cols="10,45,45", options="header"]
|
|
|
|===
|
|
|
|
|
|
a|
|
|
|
@@ -40,12 +40,16 @@ a| A Geometry represents a *visible* 3D object in the scene graph.
|
|
|
a| A Node is an *invisible “handle* for a group of Spatials in the scene graph.
|
|
|
|
|
|
<a| Purpose:
|
|
|
-a| Use Geometries to represent an object's *look*: Every Geometry contains a polygon mesh and a material, specifying its shape, color, texture, and opacity/transparency. +You attach Geometries to Nodes.
|
|
|
-a| Use Nodes to *structure and group* Geometries and other Nodes. Every Node is attached to one parent node, and each node can have zero or more children (Nodes or Geometries) attached to itself. +*When you transform (move, rotate, etc) a parent node, all its children are transformed (moved, rotated, etc).*
|
|
|
+a| Use Geometries to represent an object's *look*: Every Geometry contains a polygon mesh and a material, specifying its shape, color, texture, and opacity/transparency. +
|
|
|
+You attach Geometries to Nodes.
|
|
|
+a| Use Nodes to *structure and group* Geometries and other Nodes. Every Node is attached to one parent node, and each node can have zero or more children (Nodes or Geometries) attached to itself. +
|
|
|
+*When you transform (move, rotate, etc) a parent node, all its children are transformed (moved, rotated, etc).*
|
|
|
|
|
|
<a| Content:
|
|
|
-<a| Transformations; custom user data; +mesh and material;
|
|
|
-a| Transformations; custom user data; +no mesh, no material.
|
|
|
+<a| Transformations; custom user data; +
|
|
|
+mesh and material;
|
|
|
+a| Transformations; custom user data; +
|
|
|
+no mesh, no material.
|
|
|
|
|
|
<a| Examples:
|
|
|
a| Box, sphere, player, building, terrain, vehicle, missiles, NPCs, etc…
|