|
Here are some common development scenarii. These examples are ordered from
the easiest to the hardest. The links point to the doxygen documentation. Before
trying the second example and the following, it is recommended to read the concepts page.
means that you need QGLViewer to run the example.
1. Load and display a scene
Concepts: Loading and drawing an X3D file by using the SimpleX3DGLScene class.
Applications: Integrating an X3D viewer in a 3D visualization application.
See X3DViewer.
2. Create a new processor
Concepts: Reading the content of a scene graph using a processor which contains
the walking algorithm as well as the node visitor.
Applications: Reading, editing or displaying informations relative to the scene in text form or 3D form,
reading and translating the data into your own structure, creating a translator from X3D to another file format.
See glNormalViewer.
3. Derive an existing processor
Concepts: Extending a processor to a new node, refining the initial behaviour of a processor.
Applications: Customizing an existing processor to reuse the code and refine it when the default behaviour
is not specific enough.
See myMemReleaser.
4. Create a new node
a. Create a new simple child node
Concepts: Extending the X3D language by adding a X3DNode node to the X3D scene graph.
Applications: Adding your own informations to a scene graph and being able to save them to a file.
See icosahedronViewer.
b. Create by deriving an existing node
Concepts: Extending the X3D language by defining an X3DNode derived from an existing one.
Applications: Specializing the content of a node, by adding informations per vertex in the Coordinate node for example.
See newNodeViewer.
c. Create a new parent node
Concepts: Extending the X3D language by adding a X3DNode node that can have children, implying an extension
of the walking algorithm.
Applications: Adding subgraphs of your own to the default scene graphs.
See infoReader.
5. Animate a model
Concepts: Using the GL::IndexedFaceSet class to animate a scene.
Applications: Efficient access and modification of the existing structures.
See simpleAnimationViewer.
6. Using the MESH scene graph
a. Building your own structure from the MESH scene graph
Concepts: Reading and translating a Mesh scene graph into your own structure
by using predefined DefaultMesh avoiding the definition of template classes.
Applications: Create an X3D loader for your applications that need topology informations.
See myStructureComputer.
b. Displaying and selecting the entities of the MESH scene graph
Concepts: Making requests to a MESH scene graph and using OpenGL to display the scene.
Applications: Using the Mesh scene graph as a component of your application.
See meshViewer.
c. Printing optional basic informations via templates
Concepts: Walking the MESH scene graph and making basic requests to the Mesh node, of which
template data have been carefully chosen.
Applications: Reading the content of a scene by benefiting from the topology informations of a
Mesh structure.
See meshTransformComputer.
d. Extending the MESH scene graph via templates
Concepts: Customizing the Mesh scene graph in order to fit precisely your
needs. Creating your own Mesh data that extends the Mesh scene graph and
read from the X3D scene graph. Saving them to the X3D scene graph.
Applications: Using a personalized version of the Mesh scene graph as a component of your application.
See meshExtension.
|