Using Multi-Byte Character Sets in PHP (Unicode, UTF-8, etc)
Changing Mailman Python Scripts for Virtual Host Support
Getting Set up with Ogre 3D on Ubuntu
Development Resource Project
Symfony 2 Crash Course
ENUMs, User Preferences, and the MySQL SET Datatype

The Other G3D Examples

Wednesday, 28 December 05, 12:00 am
The example I'd like to look at next is the ArticulatedDemo. It does a whole load of things, like loading a variety of models and placing them in a scene graph. It's this scene graph thing that I think I need to understand properly.

Unfortunately, I can't get ArticulatedDemo to run - it compiles and links ok, but fails an assertion, then crashes.

The next most interesting demo is Collision_Demo, which has a set of static objects in a box, then drops a load of different sized balls in, which bounce around the place.

It compiles and runs fine.

compton

7:00 am, Wednesday, 28 December 05

Collision_Demo has five source files, namely:

  • main.cpp

    Defines the entry point (main()), the App class, and a subclass of GApplet, called Demo.

  • buildScene.cpp

    Defines methods of Demo for building a scene from static and dynamic objects.

  • Scene.cpp

    Defines the Scene object, itself made up of static objects, dynamic objects, the shadow map, and a sky. It does not use a scene graph, instead storing objects in two arrays (one for static objects, the other for dynamic).

  • Object.cpp

    Defines a family of 6 classes with Object at the head. GeneralObject, BoxObject, CapsuleObject and SphereObject all derive from Object, SimSphere derives from SphereObject.

  • Model.cpp

    Handles 3D models loaded from disk. Contains a static Table that caches loaded objects.

compton

7:00 am, Thursday, 29 December 05

The MD2_Demo, which loads Quake II format MD2 models, runs well. It loads an animated model from some Penrith game, called pknight. All files relating to the model are stored in a folder of that name. These files include MD2 files for each sub-model (the knight has a separate weapon), and PCX texture files for each submodel too.

Please enter your comment in the box below. Comments will be moderated before going live. Thanks for your feedback!

Cancel Post

/xkcd/ Geometriphylogenetics