Advanced Topics in Computer Graphics
You can use the following
code as a quick start for rendering 3D meshes. It’s a Visual C++ 6.0 project.
The application allows to
load a triangle mesh from a VRML 2.0 file or PLY2 file and to render it in
different modes (solid, wireframe,
solid with edges, draw vertices as small balls, etc...). To choose specific rendering options, work with the Rendering Modes menu.
Navigation: to rotate
the mesh, hold down the left mouse button and move the cursor. To zoom
in/out, also hold down the Ctrl key.
To move the mesh, hold down the Shift key.
Colors: you can change the color of the mesh by choosing a colored light, or by changing the material color. To do the latter, click in the mesh viewport area and then press + or -. This will scroll the palette down/up.
The main class is called
TexturedMesh (the name might be misleading - you don't need to load textures).
You can of course use another
renderer and/or write your own application if you like. The provided application
is by no means guaranteed
to be bug-free or particularly efficient.