Latest ArticlesEngine Architecture #1
Static Shadows #1
Paint on Mesh
A Tale of the Internet
Sample Stage #1 Apr 27, 2006
I use code from previous articles, and also code from my selection tutorial.
What the program doesThis program loads and displays a wireframe mesh using OpenGL and the Win32 API. You can rotate the viewing direction by dragging with the right mouse button. Clicking the left mouse button creates a ray into the screen at that location, and this ray is collision tested against the mesh, and the points of intersection are marked visually. This could be used for selecting the mesh, or selecting individual triangles.
Code DownloadSample1-Mesh_Line_Intersection.zip ( 19KB )
Included are all the .cpp and .h files, the .rc file, a readme.txt, and meshhead.dat.
There is no project file or exe. Eventually I may add these.
I haven't had a chance to do any portability/compatibility testing yet.
Future Sample ProgramsNow that I have a base to work from, future samples should be easier to make. Next stage I'll add area selection, or actually include some optimizations. I also might try to slowly build it into something that's actually useful, and for that I'll need to add a lot to the mesh class and improve the user interface.