Ogre Procedural Geometry Library         A library to quickly create geometric primitives
click to enlarge
click to enlarge

Ogre Procedural is a procedural geometry generation library, targeted at Ogre3D

Autor: Mikachu (Michael Broutin)

Documentation : User Manual and API Reference
If you have questions, ask in the forum.

Features

Existing features in current release (0.2):

• Primitives : Box, RoundedBox, Plane, Sphere, IcoSphere, Cylinder, Tube, Capsule, Cone, Torus and Torus knot
• Extrusion
• Lathe
• Triangulation
• Smooth splines by Bézier Curves (also usable for extrusion)
• Constructive solid geometry in 2D

Planned / not yet in the official release:

• A plug-in for the scene editor Ogitor
• SVG import (currently without Bézier import)
• OpenStreetMap data import
• Object description by XML file (as alternative to source code)

Screenshots

Rendering of openstreetmap XML data
click to enlarge

Source package is also available for all platforms (CMake based project files)

Usage Examples

Create a sphere:

```#include "Procedural.h"
mSceneMgr->createEntity("mySphere");```

Create a pipeline:

```Procedural::Path p = Procedural::BezierPath().addPoint(0,5,0).addPoint(0,4,10).addPoint(10,5,10).close().realizePath();
Procedural::Extruder().setExtrusionPath(&p).setShapeToExtrude(&s).realizeMesh("extrudedMesh");```

This example shows how to create a shape by a vector graphic application and how to use it for extruding.

Create SVG shape (e.g. with Inkscape):

Load the shape and define a path:

Extrude:

```// load inkscape .svg file into a shape:
Shape shape = Shape();

// construct the spline we want to extrude along:
CatmullRomSpline3 pp;
Path line = pp.realizePath();

// extruder and mesh generation
putMesh(shape.realizeMesh());
putMesh(line.realizeMesh(),1);
Extruder e;
putMesh(e.setShapeToExtrude(&shape).setExtrusionPath(&line).realizeMesh(),1);```