|
@@ -1,6 +1,6 @@
|
|
|
= Shapes
|
|
|
-:author:
|
|
|
-:revnumber:
|
|
|
+:author:
|
|
|
+:revnumber:
|
|
|
:revdate: 2016/03/17 20:48
|
|
|
:keywords: spatial, node, mesh, geometry, scenegraph
|
|
|
:relfileprefix: ../../
|
|
@@ -18,7 +18,7 @@ The simplest type of Meshes are the built-in JME Shapes. You can create Shapes w
|
|
|
--
|
|
|
[.right.text-left]
|
|
|
image::jme3/advanced/box.png[box.png,width="108",height=""]
|
|
|
-* com.jme3.scene.shape.Box – A cube or cuboid. Single-sided Quad faces (outside only).
|
|
|
+* com.jme3.scene.shape.Box – A cube or cuboid. Single-sided Quad faces (outside only).
|
|
|
* com.jme3.scene.shape.StripBox – A cube or cuboid. Solid filled faces (inside and outside).
|
|
|
--
|
|
|
|
|
@@ -33,7 +33,7 @@ image::jme3/advanced/cylinder.png[cylinder.png,width="108",height=""]
|
|
|
--
|
|
|
[.right.text-left]
|
|
|
image::jme3/advanced/sphere.png[sphere.png,width="108",height=""]
|
|
|
-* com.jme3.scene.shape.Sphere – A ball or elipsoid.
|
|
|
+* com.jme3.scene.shape.Sphere – A ball or elipsoid.
|
|
|
--
|
|
|
|
|
|
[.float-group]
|
|
@@ -47,14 +47,14 @@ image::jme3/advanced/dome.png[dome.png,width="108",height=""]
|
|
|
--
|
|
|
[.right.text-left]
|
|
|
image::jme3/advanced/cone.png[cone.png,width="108",height=""]
|
|
|
-* For a cone, set the Dome's radialSamples>4 and planes=2.
|
|
|
+* For a cone, set the Dome's radialSamples>4 and planes=2.
|
|
|
--
|
|
|
|
|
|
[.float-group]
|
|
|
--
|
|
|
[.right.text-left]
|
|
|
image::jme3/advanced/pyramid.png[pyramid.png,width="108",height=""]
|
|
|
-* For a pyramid, set the Dome's radialSamples=4 and planes=2.
|
|
|
+* For a pyramid, set the Dome's radialSamples=4 and planes=2.
|
|
|
--
|
|
|
|
|
|
[.float-group]
|
|
@@ -176,7 +176,7 @@ Use one of the above examples together with the following geometry in a scene:
|
|
|
----
|
|
|
|
|
|
Geometry geom = new Geometry("A shape", mesh); // wrap shape into geometry
|
|
|
-Material mat = new Material(assetManager,
|
|
|
+Material mat = new Material(assetManager,
|
|
|
"Common/MatDefs/Misc/ShowNormals.j3md"); // create material
|
|
|
geom.setMaterial(mat); // assign material to geometry
|
|
|
// if you want, transform (move, rotate, scale) the geometry.
|
|
@@ -187,4 +187,4 @@ rootNode.attachChild(geom); // attach geometry to a node
|
|
|
|
|
|
== See also
|
|
|
|
|
|
-* <<jme3/intermediate/optimization#,Optimization>> – The GeometryBatchFactory class combines several of your shapes with the same texture into one mesh with one texture.
|
|
|
+* xref:tutorials:intermediate/optimization.adoc[Optimization] – The GeometryBatchFactory class combines several of your shapes with the same texture into one mesh with one texture.
|