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

New ObjectTree docu image

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13808 383ad7c9-94d9-4d36-a494-682f7c89f535
parent d72694be
......@@ -11,33 +11,28 @@ which is the root of the object tree. You can get it via PluginFunctions::object
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(\ref adding_empty_objects ).
the functions provided by the \ref loadSaveInterfacePage. Additionally there is a small example on how
to add empty objects to the scene which can be filled by the programmer: \ref adding_empty_objects
\subsection DataAccess Access to data from within the Plugins
From each plugin you have to get access to the data. Functions to get the right data are provided in the
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
From each plugin you have to get access to the data. Functions to get the right data are provided by the build-in
ObjectIterators(\ref OpenFlipperIterators ). If you need consistent data access during the plugin
lifetime (e.g. you have to track one mesh during the plugin lifetime) you should use the identifiers made
available in this namespace which never change( \ref identifying_objects).\n \n
available by the objects which never change( \ref identifying_objects).\n
It is possible that the vector containing the objects changes during the plugin lifetime (added or deleted objects).
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
has been deleted. LoadSaveInterface::objectDeleted() will tell you if an object is deleted.
If you have to keep track of these changes, implement these functions.
If you have to keep track of these changes, implement these functions. More information about the update
notifiation system is described in the BaseInterface documentation (\ref baseInterfacegeneralObjectUpdates )
\section identifying_objects Identifying Objects
Objects in OpenFlipper get a unique id when they are created. This id will not change during runtime.
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
PluginFunctions provided by the data type (e.g. PluginFunctions::triMeshObject() ). This way, you will always
PluginFunctions provided by the data type (e.g. PluginFunctions::triMeshObject(int) ). This way, you will always
be sure to get the right object.
\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
you can derive from the LoadSaveInterface. This interface provides load and save functions
to tell the core that you want to access existing data types.
\section basicObjectTypes Basic object types
\subsection baseObjectDescription BaseObject
All objects are derived from BaseObject. This object implements the basic object
......
......@@ -16,10 +16,10 @@
* - \subpage uiconcept "User Interface Concepts"
* - \subpage buildingOpenFlipper "Building OpenFlipper"
* - \subpage pluginProgramming "Plugin Programming"
* - \subpage datatypes "Integrated Datatypes"
* - \subpage dataStructure "Datastructures"
* - \subpage dataFlow "Dataflow"
* - \subpage options "Command line options and config files"
* - \subpage datatypes "Integrated Datatypes"
* - \subpage scripting
*
* \subpage misc
......
% File showing the updated object flow
% Author: Jan Möbius
\tikzstyle{ObjectRoot}=[ellipse, draw=black, fill=blue!30!white, drop shadow,text centered, text=black, text width=2cm]
\tikzstyle{GroupObject}=[ellipse, draw=black, fill=blue!10!white, drop shadow,text centered, text=black, text width=1.8cm]
\tikzstyle{Object}=[ellipse, draw=black, fill=red!30!white, drop shadow,text centered, text=black, text width=1cm]
\tikzstyle{Group} = [fill=orange!30!white,rectangle,rounded corners,draw,inner sep =0.4cm]
\begin{center}
\begin{tikzpicture}[node distance=1cm]
\node [ObjectRoot] {Object Root}
[sibling distance=3cm]
child {node[Object] {Object}}
child {node[GroupObject] {GroupObject}
child {node[GroupObject] {GroupObject}
child {node[Object] {Object}}
child {node[Object] {Object}}
}
child {node[Object] {Object}}
}
child {node[GroupObject,xshift=0.5cm] {GroupObject}
child {node[Object] {Object}}
};
\begin{pgfonlayer}{background}
\node[Group,fit=(current bounding box) ] (Background) {};
\end{pgfonlayer}
\end{tikzpicture}
\end{center}
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