summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/basicshapes-cpp
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2015-06-24 15:01:02 +0200
committerLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2015-06-30 14:41:54 +0000
commit289a8faaca66d2539e8c6b695549fb14e6c4d8b3 (patch)
tree46fbe60c74506c5b5e7318a38b5acdadf60f2605 /examples/qt3d/basicshapes-cpp
parent9298ba2b957fcd0c16ef5cfc1a6964a66cc06ae5 (diff)
Doc: edit the Basic Shapes example docs
Use standard structure for example docs. Refer to an include file in qtbase\doc\global that describes building and running from Qt Creator. Fix grammar and style issues according to the Qt writing guidelines. Change-Id: I515561325da34bee3ceeb522d35d2f38ea23256a Reviewed-by: Mika Salmela <mika.salmela@theqtcompany.com> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Diffstat (limited to 'examples/qt3d/basicshapes-cpp')
-rw-r--r--examples/qt3d/basicshapes-cpp/doc/src/basicshapes.qdoc28
1 files changed, 16 insertions, 12 deletions
diff --git a/examples/qt3d/basicshapes-cpp/doc/src/basicshapes.qdoc b/examples/qt3d/basicshapes-cpp/doc/src/basicshapes.qdoc
index 004b06817..75da8e12d 100644
--- a/examples/qt3d/basicshapes-cpp/doc/src/basicshapes.qdoc
+++ b/examples/qt3d/basicshapes-cpp/doc/src/basicshapes.qdoc
@@ -29,39 +29,43 @@
\example basicshapes-cpp
\title Qt3D: Basic Shapes C++ Example
\ingroup qt3d-examples-cpp
- \brief Shows four basic shapes that Qt3D offers.
+ \brief Shows four basic shapes that Qt3D offers and sets up a mesh for each of them.
- The Basic Shapes examples shows four basic shapes that Qt3D offers, a torus,
- a cylinder, a cube and a sphere. The example also shows how to embed a Qt3D scene
+ \image basicshapes-cpp-example.jpg
+
+ \e {Basic Shapes} shows four basic shapes that Qt3D offers: a torus, a cylinder,
+ a cube, and a sphere. The example also shows how to embed a Qt3D scene
into a widget and connect with other widgets.
- \image basicshapes-cpp-example.jpg
+ \include examples-run.qdocinc
+
+ \section1 Setting Up a Torus Mesh
- As an example let's go through how to set up a torus mesh. First instantiate
- the \c QTorusMesh, and then set the mesh specific parameters, that for torus are
- radius, minor radius and how many rings and slices.
+ As an example, we go through how to set up a torus mesh. First, we instantiate
+ the \c QTorusMesh, and then we set the mesh specific parameters, which for torus are
+ radius, minor radius, and the number of rings and slices.
\snippet basicshapes-cpp/scenemodifier.cpp 0
The size and position of the torus can be adjusted with transform components.
- We create scale, translation and rotation components and add them into the
+ We create scale, translation, and rotation components and add them into the
\c QTransform component.
\snippet basicshapes-cpp/scenemodifier.cpp 1
- To change the diffuse color of the mesh we create a \c QPhongMaterial and set
+ To change the diffuse color of the mesh, we create a \c QPhongMaterial and set
its diffuse color.
\snippet basicshapes-cpp/scenemodifier.cpp 2
The final step is to add the torus into an entity tree, and we do that by creating
- a \c QEntity with parent entity and adding the previously created mesh, material
+ a \c QEntity with a parent entity and adding the previously created mesh, material,
and transform components into it.
\snippet basicshapes-cpp/scenemodifier.cpp 3
- You can control the visibility of the entity by defining if it has parent
- or not, i.e. whether it is part of entity tree or not.
+ We can control the visibility of the entity by defining whether it has a parent
+ or not. That is, whether it is part of an entity tree or not.
\snippet basicshapes-cpp/scenemodifier.cpp 4