Framework |
This page explains how to use the class CMyd3dclassApp, part of the library d3dView. This class allow to build very easily 3d tools. The framework is composed of three views. The one on the left is dedicated to rendering. The user can manipulate the scene with the mouse (object rotation, translation, zoom and first person camera changes). The one in the upper right corner shows the infos related to Diretc3D, for example, the FPS. In the lower right view, one can easily add widgets for tuning its program.
Here is an example :
download : the library (one .lib and one .res for ressources) or the whole code source.
In the following lines, i explain shortly how to use my application class. This is very simple since when user does not have its rendeing view ready, it's still possible to use the class with a default scene, it displays a basic triangle with diffuse color, and there is no button to tune the animation.
The first step is thus to use the default behavior for the class :
For using its own class for rendering, best is to inheritate the class CMyd3dclassView like the default class does. This class must redefine a few thinks like : initGeometry,render... For seeing its parameters in the lower left view, one can create a new formview. When this two classes are defined, pass them to the constructor of CMyd3dclassApp like this :
CMyd3dclassApp(RUNTIME_CLASS(my_rendering_class) , RUNTIME_CLASS(my_parameters_view_class)) and this should work. Easy, isn't it ?
Author : Adrien
Auclair
adrien.auclair at club-internet.fr
Last update : 17/11/2004