[1 introduction] [2 overview] [3 reference] [4 GUI]
The Application Programming Interface (API)
1. The building blocks of the E3D library
The blocks in the following diagrams represent classes (C structures) with only the relevant fields shown.
For the complete definition of a structure, please refer to the appropriate header file (e.g.: for E3dNode, see Node.h).
E3D uses a balanced combination of compile-time classes, runtime-typed classes and object-composition.
For the impatient, here is the (compile-time) class-inheritance diagram:
The diagram is quite simple because most of everything else is runtime-typed. Runtime classes are typically registered by plugins (over 90% of EQUINOX-3D is made of plugins).
Runtime-typed object composition and the light-weight core also makes it easy to turn EQUINOX-3D into a graph-based XML schema editor, a Solar System simulator, a video game, or pretty much anything you can imagine.
Thanks to this high level of flexibility and modularity, EQUINOX-3D is more like a 3D operating system than a fixed application.All objects (EObject, E3dGeometry etc.) can be freed with E_Delete, or E_DeleteChk (also performs a NULL pointer check). These are macros that handle reference counting and the optional full reference tracking (great for debugging).
The only exception is E3dNode and its sub-classes. These should be freed with E3d_NodeHrcFree, to ensure the proper tear-down of graph connections.
There is a powerful, optional full reference-tracking and garbage collection system that can be completely "compiled out", so it has zero overhead.
In release builds, Object New, Delete etc. operators simply revert to a ref-count check and malloc / free calls.
If you are developing EQUINOX-3D plugins and would like a debug build of EQUINOX-3D with this system built and enabled, please send me an email.
The fundamental building-block of E3D is the E3dNode.
Multiple Nodes can be connected together to create a hierarchy in the following manner:
When the application programmer creates a new hierarchy, or changes the connections in an existing one,
he/she will only have to set the Parent, Child and NextSibling fields and call the function: E3d_NodeHrcUpdateConnections() with the root of the hierarchy
to update the other link-related fields.
"Above" the Models, there is a structure called E3dScene. This contains all the information about a given "3D world".
< Previous|Next >