12/22/2007 12:39 PM
Whereas the Windows Presentation Foundation (a part of .NET 3.0) introduces pure .NET classes for drawing simple 3D graphics, its functionality may be not enough for feature-rich 3D applications. If this is the case, some more powerful graphics library may be required, such as OpenGL. Fortunately a managed .NET facade to unmanaged OpenGL dll's exists. This facade is a part of the Tao framework and allows accessing OpenGL functions from .NET applications as easily as it is done from managed C/C++ code.
Last few days I have been experimenting with OpenGL in .NET and have written a small application which visualizes 3D objects specified in a binary STL file format. The application allows moving and rotating the camera (eye point) and switching between different rendering options (smoothing, plane clipping, striped rendering). The archive already contains an STL 3D model of a cow, other models can be found on the Internet or converted from other formats (e.g. *.PLY) using MeshLab for example. A number of 3D models in PLY format can be found at http://www.cs.princeton.edu/gfx/proj/sugcon/models/. The example application can be downloaded from the Downloads section of this website or just click here.