j'ai un moteur 3d pour delphi voici le contenu de fichier ReadMe accompagnant son code source: ******************************** 3D rendering engine source code for delphi
Written by Peter Bone
http://www.geocities.com/peter_bone_uk
12 / 5 / 2003
This source code demonstrates the techniques used to handle 3D graphics from scratch - without using an API such as OpenGL. The code includes Gouraud shading, which gives much better quality than flat shading for curved surfaces. Also included are methods for building general 3D shapes. The code does not yet include texture mapping.
To create a 3D object, first create an instance of the T3DModel class. You must then build the model by creating the vertices and faces. This can be done using the BuildRotationalVolume procedure, which can be used to create many different shapes. You could also write your own code to build the model bearing in mind that the vertices at the corners of the faces must be listed in clockwise order. You must then specify the center point of the object and the position of the light source. Other parameters that must be initialized are the perspective constants and viewing vector. Once the model is built, you can translate the object to a position on the screen using the Translate procedure or rotate it around an axis by a given angle using the Rotate procedure. To render the object to a canvas, call the ClearBitmap procedure and then call the RenderObject procedure. You must then draw the off screen bitmap to the canvas by doing ACanvas.Draw(0,0,OffScrBmp);. See the example of how to use the class to render a juggling club in the included Project1.dpr project. ************************************* je me rappelle plus de quelle site je l'ai prit,mais si vous le trouver pas et si ça vous s'interresse ,j'ai le code source ...
|