Changing Mailman Python Scripts for Virtual Host Support
Installing Xdebug for use with Eclipse or Netbeans on Linux
Nice n' Easy JQuery Image Rotator
A Simple ISAPI Filter for Authentication on IIS
Book Review: How to Implement Design Patterns in PHP
Using PHP pspell Spell Check Functions with a Custom Dictionary

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.
 
 
Leave Comment

/xkcd/ ISS Solar Transit

About This Page