Back On The Chain Gang

nominal-chimera-text.png

I have been pretty unwell as you know. I accepted my lot. Most things in life you can do very little about. It’s shocking that so many things go as you might expect, or then again, maybe they go that way because you allow yourself to become accustomed to how things turn out, whether or not you wanted things that way.

So today, I got back to the office and coughed and spluttered my way through half a day of work. I had very little energy by the working day’s end and expected to get an early night.

I fired up Xcode anyhow and managed to get a fair bit done, of which I’m very pleased. I made progress in a number of areas.

First, I wrote a simple “Constrainer” class that given a point, limits it to a 3D block of variable size. Very simple really, but it stops my man from falling off the edge of the room or climbing above its given height.

You might be interested in where I got the dimensions from? Well they’re being read off an XML file and I’m now using the RapidXML library as recommended by Ricky. Wasn’t as difficult as I feared in the end.

I did have to write a simple File Loader class too, because openFrameworks doesn’t have any built-in file-loading abstraction and neither does RapidXML (it expects a character pointer)

And finally, I managed to get text printing isometrically, which made me very happy. I know this is no achievement for real programmers, but it was a nice, simple problem that nobody had a library for and I had to do it myself, so I was happy with that. Here’s some of the code:

Screen shot 2010-09-20 at 23.46.01.png

Really simple, just to get it working. I’ll turn this into an IsoTextPrinter class next, with the ability to isometrically print down the X axis (remember the Chimera axes, right?) and up the Z axis. the IsoTextPrinter class should also allow a bunch of state setting to allow text scaling, colour, alpha and rectangular background. Then of course, I want the text to behave like particles because it will be used in scores.

I’m looking forward to working out a rhythmic scoring system, but for now, I just wanted to print isometric text.

I’d like to leave you with one of my favourite songs of all time, from one of my favourite bands of all time.

Leave a Reply

Your email address will not be published. Required fields are marked *