examples/contribs
directory.
![]() |
The LGPL lib3ds library is used to load and display a 3ds scene. You need to install the lib3ds library (version 1.2) in order to compile this file. See http://lib3ds.sourceforge.net/. The current version (Version 1.2, Dec 2002) of the lib3ds library is flawed and results in : 3dsViewer.cpp:62: `lib3ds_file_bounding_box' undeclared (first use this function)
A patched version is available on the Unix installation page.
You can alternately add this line in the file that uses extern "C" { LIB3DSAPI void lib3ds_file_bounding_box(Lib3dsFile *file, Lib3dsVector min, Lib3dsVector max); } This example is simply a translation of a lib3ds example. Although it uses display lists, the rendering speed does not seem to be as good as with other 3ds libraries (10 factor speed up). Note however that this is due to the lib3ds library and not QGLViewer. Press 'L' (load) to load a new 3DS scene. |
![]() |
Implementation of the game of Agora. Agora is a strategy game for two players. The code is rather complex and can be divided in two parts : a QGLViewer implementation for the viewer and an artificial intelligence that allows you to play against the computer.
You should find the rules of the game on the web. Questions relative to the artificial
intelligence implementation should be asked to Computer player programs are expected to take three parameters: a board file name, an allowed time (expressed in milliseconds and which sign determines which player is to play) and the remaining number of moves before the game is declared over. The output should be the x,y coordinates of the start and end positions of the move to play. |
![]() |
Displays a scene in pseudo-stereo using anaglyph. The anaglyph stereo mode displays simultaneously two colored views of the scene. You need to wear glasses with colored lenses (here red and blue) to view the stereo image. Each eye then sees the associated view, creating the stereo illusion.
All that is needed is to use the |
![]() |
Displays a background image in the viewer.
This example is derived from the textureViewer example. It displays a
background image in the viewer using a texture. The texture is simply mapped to a quad, drawn before
the rest of the scene. The depth buffer is flushed after the drawing.
This example was created by Sylvain Paris. Thanks to him. |
![]() |
Implementation of the game of BlobWar. BlobWar is a strategy game for two players. The rules are available in the help menu. The two players can be human or computer. Computer player programs are expected to take two parameters: a board file name and an allowed time (which sign determines which player is to play). The output should be the x,y coordinates of the start and end positions of the move to play. A naive greedy AI program is provided in the AI directory. |
![]() |
Displays a world axis in the lower-left corner of the window. A world axis representation is drawn in the lower left corner, so that one always sees how the scene is oriented.
The axis is drawn in This example is very similar to the thumbnail example. |
![]() |
Implementation of the game of Dvonn. Dvonn is a very good strategy game for two players. See the Help menu for complete rules. Consider buying the game if you liked it. It is quite cheap and really nicer than this version. See the GIPF project web page for details. This example was created by Xavier Decoret. |
![]() |
Records a scenario that can be replayed and converted into a movie.
An |
![]() |
A simulation of the game of Quarto.
See the This program was originally coded by Matthieu Richard. |
![]() |
A random fractal terrain with trees, animated water, sky and shadows. This example was created by Serigne Sow and Joerg Liebelt. It features a textured quadtrees fractal terrain, which resolution is dynamically updated depending on the camera position. Acknowledgments to Stefan Roettger for his article Real-Time Generation of Continuous Levels of Detail for Height Fields. |
![]() |
Loads an image file and texture maps a polygon with it. Pedagogical example that shows how to apply a texture on a 3D object. Inspired from the Qt texture example.
The Qt |
![]() |
Displays an alternative 3D view in a corner thumbnail.
This example shows how a thumbnail can be inserted in a corner of the viewer to display an
alternative display. This can be useful for data structure inspection, different rendering (as
illustrated here) or debugging. It uses This example was created by Sylvain Paris. |
Back to the examples main page.