Feature 1 – Load OBJ meshes into your scene

1.  Load OBJ meshes into your scene     In order to bring in standard obj meshes from Blender, we just need to increase the robustness of the code slightly.  First, the code checks the beginning of the file for a ‘#’ symbol.  If absent, the code continues as before.  Otherwise it goes through the […]

Feature 3 Post Mortem

This feature is all about lighting.  We’ve covered this all in great depth in class already, so there really wasn’t a whole lot that gave me any trouble.  The lighting includes ambient, diffuse, and specular lighting (using the Blinn method in particular).  Everything I used as a reference came directly from Chris Johnson. Here are […]

Feature 1 Post Mortem

Loading a .obj mesh is a relatively straightforward task using the masterfully written code provided to us by Chris Johnson (Extra Credit?).  I decided to augment the ObjUtilities class to make it slightly more robust.  The utility can now handle comment lines or other odd lines throughout the file, as well as count the vertecies […]

Feature 5

In order to get this feature to work I had to do two main things: Add a terrain class that I could use to sample the terrain height at a given location, and improve the camera class to function more like a fps camera. My terrain class is a height map that is generated from […]

Feature 2

Generating terrain wasn’t terribly hard. At first, I wanted to write my own generator, with an algorithm other than diamond square. I wanted a landscape that resembled mountain ranges more than rolling hills. I got about half way there. The issue was all of the mountains looked like long, skinny ramps due to the order […]

CS 330 Lecture 17 – Callbacks and Parsing with ANTLR

Agenda one more thing on C function pointers: callbacks http://www.opengl.org/resources/libraries/glut/spec3/node46.html http://www.opengl.org/resources/libraries/glut/spec3/node54.html#SECTION00089000000000000000 program this the translation process: lexing, parsing, generating ANTLR v4 why write our own languages and parsers? TODO Read chapter 2 through section 2.1. Walk through http://www.antlr.org/wiki/display/ANTLR4/Getting+Started+with+ANTLR+v4. Quarter sheet. Program This Code torus.c Divs.g4 messy.txt PrettyPrinter.java Haiku