Commit d1983b51 authored by Jan Möbius's avatar Jan Möbius
Browse files

datastructure docs



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11393 383ad7c9-94d9-4d36-a494-682f7c89f535
parent ef4855e7
/** \page dataStructure Datastructures /** \page dataStructure Data Structures
*
* \section Overview \section Overview
*
* \image html ObjectTree.png
* All Objects have to be derived from the BaseObject. For the predefined objects this is
* already the case. In BaseObject a tree structure is implemented. You can use the functions All Objects in OpeFlipper have to be derived from the BaseObject. For the predefined objects this is
* in BaseObject to search for items and access them. A root Object is created by OpenFlipper already the case. In BaseObject a tree structure is implemented. You can use the functions
* which is the root of the object tree. You can get it via PluginFunctions::objectRoot(). There in BaseObject to search for items and access them. A root Object is created by OpenFlipper
* is also a groupobject which holds no data and is used for grouping different objects. which is the root of the object tree. You can get it via PluginFunctions::objectRoot(). There
* is also a GroupObject which holds no data and is used for grouping different objects like in the figure above.
* All objects in OpenFlipper are handled by the core. To create and delete objects use
* the functions provided by the LoadSaveInterface. All objects in OpenFlipper are handled by the core. To create and delete objects use
* the functions provided by the LoadSaveInterface(\ref adding_empty_objects ).
* \section loadingDataAndExistingTypes Loading data and existing types
* If you want to load or delete data from within your plugin and you only use existing types \section identifying_objects Identifying Objects
* you can derive from the LoadSaveInterface. This interface provides load and save functions Objects in OpenFlipper get a unique id when they are created. This id will not change during runtime.
* to tell the core that you want to access existing data types. It is possible, that pointers change so you should only use the id to reference objects in your plugins.
* To get this id, just call the BaseObject::id() function. To get an object with a specific id, you can use the
* \subsection DataAccess Access to data from within the Plugins PluginFunctions provided by the data type (e.g. PluginFunctions::triMeshObject() ). This way, you will always
* From each plugin you have to get access to the data. Functions to get the right data are provided in the be sure to get the right object.
* PluginFunctions Namespace. Here are all functions which should be used to access the data. Most of the
* time you will use the ObjectIterator defined there. If you need consistent data access during the plugin \section loadingDataAndExistingTypes Loading data and existing types
* lifetime (e.g. you have to track one mesh during the plugin lifetime) you should use the identifiers made If you want to load or delete data from within your plugin and you only use existing types
* available in this namespace which never change.\n \n you can derive from the LoadSaveInterface. This interface provides load and save functions
* It is possible that the vector containing the objects changes during the plugin lifetime (added or deleted objects). to tell the core that you want to access existing data types.
* Only the identifiers will stay constant. If one of these changes occurs, the main application will call
* BaseInterface::updatedObject() of all Plugins containing the id of a changed object or -1 if an object \subsection DataAccess Access to data from within the Plugins
* has been deleted. LoadSaveInterface::objectDeleted() will tell you if an object is deleted. From each plugin you have to get access to the data. Functions to get the right data are provided in the
* If you have to keep track of these changes, implement these functions. PluginFunctions Namespace. Here are all functions which should be used to access the data. Most of the
* time you will use the ObjectIterator defined there. If you need consistent data access during the plugin
* \section basicObjectTypes Basic object types lifetime (e.g. you have to track one mesh during the plugin lifetime) you should use the identifiers made
* \subsection baseObjectDescription BaseObject available in this namespace which never change.\n \n
* All objects are derived from BaseObject. This object implements the basic object It is possible that the vector containing the objects changes during the plugin lifetime (added or deleted objects).
* functions. It creates a tree structure of all available objects, includes object Only the identifiers will stay constant. If one of these changes occurs, the main application will call
* selection, name and type information. It does not contain any code to visualize BaseInterface::updatedObject() of all Plugins containing the id of a changed object or -1 if an object
* objects. has been deleted. LoadSaveInterface::objectDeleted() will tell you if an object is deleted.
* Each object derived from BaseObject has a datatype function BaseObject::dataType. If you have to keep track of these changes, implement these functions.
*
* Additionally you can add data to each object by using the perObjectData class. \section basicObjectTypes Basic object types
* See PerObjectData \subsection baseObjectDescription BaseObject
* All objects are derived from BaseObject. This object implements the basic object
* \subsection baseObjectDataDescription BaseObjectData functions. It creates a tree structure of all available objects, includes object
* This class is derived from BaseObject and includes basic visualization functions. It creates selection, name and type information. It does not contain any code to visualize
* the basic scenegraph nodes for the object ( TODO : See per Object Scenegraph structure ). objects.
* Each object derived from BaseObject has a datatype function BaseObject::dataType.
* For every object, the top scenegraph node is the ObjectData::SeparatorNode*. All other
* nodes ( including per object custom nodes ) have to be added below this node. Additionally Additionally you can add data to each object by using the perObjectData class.
* an ManipulatorNode is added below the separator node. This manipulator is used to move See PerObjectData
* or transform the object. Normally this node is managed by the move plugin. If you
* use per object nodes which should be transformed along with the object you can attach \subsection baseObjectDataDescription BaseObjectData
* them below this node ( BaseObjectData::manipulatorNode() ). This class is derived from BaseObject and includes basic visualization functions. It creates
* the basic scenegraph nodes for the object ( TODO : See per Object Scenegraph structure ).
* Additionally per object scenegraph nodes can be managed automatically by BaseObjectData.
* For every object, the top scenegraph node is the ObjectData::SeparatorNode*. All other
* nodes ( including per object custom nodes ) have to be added below this node. Additionally
* \subsection MeshObjectDescription MeshObject an ManipulatorNode is added below the separator node. This manipulator is used to move
* MeshObject is the class representing triangle or poly meshes. It uses OpenMesh as its or transform the object. Normally this node is managed by the move plugin. If you
* data structure. use per object nodes which should be transformed along with the object you can attach
* It is based on BaseObjectData and adds additional scenegraph nodes. First it creates a materialNode them below this node ( BaseObjectData::manipulatorNode() ).
* used to set the meshes rendering material properties, followed by a texture node ( MeshObject::textureNode() ). A shader node ( MeshObject::shaderNode() ) is than
* added to manage the systems and user defined shaders. Below the shader node is the mesh node ( MeshObject::meshNode() )which actually Additionally per object scenegraph nodes can be managed automatically by BaseObjectData.
* renders the mesh.
* Additionally some nodes to render selection, features or modeling areas are added by the MeshObject
* \subsection MeshObjectDescription MeshObject
* See MeshObject for the detailed function documentation. MeshObject is the class representing triangle or poly meshes. It uses OpenMesh as its
* data structure.
* It is based on BaseObjectData and adds additional scenegraph nodes. First it creates a materialNode
* \section creatingCustomObjectTypes Creating custom object types used to set the meshes rendering material properties, followed by a texture node ( MeshObject::textureNode() ). A shader node ( MeshObject::shaderNode() ) is than
* added to manage the systems and user defined shaders. Below the shader node is the mesh node ( MeshObject::meshNode() )which actually
*/ renders the mesh.
Additionally some nodes to render selection, features or modeling areas are added by the MeshObject
See MeshObject for the detailed function documentation.
\section creatingCustomObjectTypes Creating custom object types
*/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment