Programming for Genesis

Once you've installed Genesis you will find the 'Genesis programming specification' in the \Genesis\Doc directory in both Microsoft Word format and as a plain text file. This document describes in detail all aspects of programming for genesis. You will also have a Genesis\Include and Genesis\Lib directories containing everything you need to be able to start programming totally free of charge. The only thing we don't supply you with is a C compiler (sorry).

The programming spec is very easy to understand (it has many pictures and diagrams) and assumes no prior knowledge of 3D graphics systems.

Programming Spec. pic

Genesis can be programmed in three possible scenarios;

Writing tools for the editor
Additional tools can be created very quickly using the Tool and Geometry APIs. The Geometry engine is so versatile that a tool be almost anything, e.g. a file format loader or saver, a VRML internet connector , a fractal landscape creator or simple primitive creators for cylinders, cones and boxes etc.

Writing applications for Genesis
The editor is a Genesis application but by no means the only one. Using the Geometry API you can write your own applications which could include games, simulations, or scientific visualisation.

Writing new Geometry engines
The Geometry engine can be replaced by writing a simple DLL which exports the set of functions required by the Geometry API. The Helper API exists to make this easier. You might want this to support a hardware accelerated 3D graphics card for instance.

Genesis has a set of comprehensive programming interfaces comprising of five main parts;

Geometry API
Calls to build and render objects e.g. AddObject(), DefPatch() and Render().

Maths API
Geometry related C functions and C++ classes, e.g. vecA=vecB*mat, multiplies a vector with a matrix and ConvToPolar() converts a Cartesian vector to polar co-ordinates.

Tool API
Extensions to the main Geometry API to enable tools to be added to the editor, e.g. GetNextSelectedObject() returns the Geometry handle of the next object selected by the editor’s select mode and RemoveOverlay() turns off the editors overlay.

Helper API
Functions to aid development of new geometry engines, e.g. Split(), splits an n sided polygon up into smaller polygons and CompNormal() computes the normal of a set of points on a polygon.

Debug API
Set of functions to help debugging. This is a general debug library which handles tracing and memory management and can report any memory your application/tool/engine has left unfreed.

Licensing agreement

The Genesis editor and programming toolkit are Freeware. This means they are freely distributable on any media as long as they are not used for commercial gain. If any commercial product uses any part of the Genesis toolkit or APIs then a small royalty payment should be paid to Silicon Dream Ltd. The payment is negotiable on an individual basis. Contact me on spike@silicond.demon.co.uk for details.

Special note to programmers

For tool coders a special offer has been made. Anyone that writes a tool which is robust and generally useful to others can send it to me and it will be packaged in the next release of Genesis. Any royalty payments or unlocking fees received will then be shared amongst all those who contributed towards making Genesis a better product. Please feel free to ask me for advice or help with aspects of programming Genesis, or to report bugs.