Procedurally generated geometry tutorial

From Horde3D Wiki
Revision as of 19:58, 27 August 2009 by Wakko (talk | contribs)
Jump to: navigation, search

Work in progress

Important notes

  • The code used here has been tested with Horde3D 1.0.0 beta2 and beta3 and will NOT work with the latest release (beta4)


Overview

The problem

You want to create and display a procedurally generated mesh that, instead of being loaded from a Horde3D Scene node and a geoemtry file(*.scene.xml, *.geo), will be created in-memory by some algorithm.

Basic approach

To do that you have to create a mesh first and then "fake" the .geo-file and the scene node itself and pass it to the engine.

StreamGenerator

CustomGeometry base class

Simple Square

Simple Grid

Usage example