This is an old revision of the document!
Table of Contents
Entity
An Entity is a single static object in the world. It is based on an Object.
An Object is somewhat the Type definition for an Entity. When an object is changed, all entities that refer to this object also change. An object can contain a number of render elements, a number of collision meshes, and other things like maybe contact points, lights, …
A Mesh represents a renderable Model. A mesh can be used in different objects. A mesh can consist of parts using different materials. Can be imported from 3dsmax or created procedurally. The point of a mesh is to represent a collection of parts that together form some kind of visual object. If changes are made to the mesh, all objects using this mesh are affected. A mesh also binds materials to the parts.
A MeshPart represents a single piece of geometry (which can be rendered with one DrawPrimitive call). It does not contain any material info.
TODO: rename to Geometry or smth? EDIT: <color red>Now that this is also shared, this should be renamed.</color>
Classes
IMesh, IEntity, IObject, IMeshPart
These interfaces represent the DataObject pointers. Their implementation is totally free, but the implementing object must be capable of representing the entire DataObject.
ObjectFullData
Currently contains all data for an Object, including a list of models (currently ModelFullData)
ObjectFullDataFactory
Factory for serializing the ObjectFullData to the WorldDatabase
MeshCoreData
This holds the very core data for this mesh. This currently only contains the references to the MeshPart DataItems. NOTE: this is a design quirk, and maybe if this happens more often (a dataItem containing other DataItems), support for this should be added natively in the WorldDatabase.
MeshAdditionalData
This contains extra info about the mesh: importer, imported date, modeler, etc.
ObjectCoreData
This contains the core info about an object: which subparts it contains (ObjectSubpiecesData?)
EntityCoreData
Core Entity information
MeshPartGeometryData
Contains stream sources. Every element of each source is part of one vertex. Every three vertices form a triangle.
MeshPartAdditionalData
Extra data
TangentSolver
Helper class to create tangents from a mesh with position, normal and texcoord. TODO: this is not yet tested or used in any way
ModelGeometryData
(ALLREADY deprecated!) Represents the core geometry of the model. Note: could be made uniform GeometryData