News Overview SceneEngine Downloads VideoTutorials Main Page SourceForge Get Involved Bookmark and Share

SceneEngine is a 3D SDK Library that can be linked in your application.

The SceneEngine project will have two main types of executables:


SceneEngine.exe

A command line application that loads all the SceneEngine library and the ScEng Lua scripting library and allows the user to load, access, modify and save a scene using only scripting commands in a shell application.


CrackArt.exe

A wxWidgets application that loads all the SceneEngine library and the Lua scripting library and allows the user to load, access, modify and save a scene in a graphical user interface with a 3D Viewport display and widgets that give him access to all the properties of the scene components.

These two applications need to load DLL files with SceneEngine Blocks, and ideally these two applications should be able to load the same DLL files.


Block related DLL functions


A DLL file can define new Block classes that need to be linked with SceneEngine so the user can use the new classes defined in these DLL files either in SceneEngine.exe or CrackArt.exe. For these we need two functions in our DLL loader:


GetNumBlockDescriptors()

This function returns the number of BlockDescriptors that are defined in this DLL file.


GetBlockDescriptor(i)

This function returns the i-th BlockDescriptor defined in this DLL.

So, the idea is that the same DLL file can be loaded by SceneEngine.exe or by CrackArt.exe without changes.


CrackArt User Interface related DLL functions


CrackArt is a wxWidgets application with a Dynamic user interface with support for plugins. When a Block is loaded into CrackArt from a dynamic DLL using GetNumBlockDescriptors and GetBlockDescriptor, or from the core.dll using the SceneEngine library methods, CrackArt doesn't know where or how to display this Block's user interface. Furthermor, this Block doesn't even has a user interface defined. Depending on the Block it can have a DataTable member. If the Block has a DataTable member, then CrackArt can use it to display the most basic parameters of this Block in a grid like user interface, the Attribute Editor.

Most Blocks don't need a User Interface, but many do.


There are 3 main types of nodes that have a user interface:


Materials : These are all the blocks derived from Material class, including Texture and PlaceTexture blocks.


Objects : These are all the blocks derived from the Object class. This is probably the most complex and important class in SceneEngine. It includes primitive objects like Sphere or Torus, Raw geometry objects like TriMeshObject or BezierSplineObject, helper objects like CameraObject and LightObject, and objects with modifiers.


Animation Controllers : These are all the blocks derived from the AnimationController class.


CrackArt will have a Control Panel with 3 tabs, one for each of these types.

Since the Block or the BlockDescriptor classes don't define a User Interface for these blocks, we need another mechanism for getting a defined user interface from a DLL that is linked and loaded into CrackArt.exe. This DLL could probably define two new functions:


GetNumBlockGUIs()

Returns the number of BlockGUIs defined in this DLL


GetBlockGUI(i)

Returns the i-th BlockGUI defined in this DLL.


A BlockGUI would be a class that defines the GUI of a Block. These two classes can be connected using the BlockType. All Blocks have immplement a GetBlockType method that returns an unique BlockType.

Views