Commit ad9c091e authored by Jan Möbius's avatar Jan Möbius

Improved doc for the update flow

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13827 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 09fd39d4
......@@ -355,8 +355,8 @@ this change. This functionality is provided by the signals and slots for \ref Ba
\image html ObjectUpdateNotification.png
If you change data you have to emit one of BaseInterface::updatedObject(int) or BaseInterface::updatedObject(int,const UpdateType&).
\n
If you change data you have to emit one of BaseInterface::updatedObject(int) or BaseInterface::updatedObject(int,const UpdateType&).\n
BaseInterface::updatedObject(int) forces an update of the whole object while BaseInterface::updatedObject(int,const UpdateType&)
can be restricted to a part of the object ( Geometry,Selection, ... ; see UpdateType ) and is therefore faster and should be preferred.
......@@ -368,7 +368,11 @@ implement this slot if you need to react on object changes.
\note Don't emit updatedObject from within slotObjectUpdated as this will cause an endless loop!
\note If the object id passed to the functions is -1 all objects should be treated as updated.
After all plugins have been informed, the scene will be redrawn.
After all plugins have been informed, the node itself gets updated. This means that for the corresponding object the update function is
called (BaseObjectData::update() ). This function is implemented by every object type in OpenFlipper and has to take care of reacting
to modifications of the object. E.g. the TriMeshObject, this could mean, that the OpenMesh data has changed (UPDATE_GEOMETRY). The object
would than trigger an update of the rendering buffers which are used to draw the mesh.
\note You should not call the update functions of an object directly as this means unnecessary overhead (As the core will call the function anyway on an update).
For more details about the UpdateType read the documentation about UpdateType and \ref DefaultUpdateTypes "predefined update types".
A description for adding custom update types at runtime is available \ref UpdateTypeFunctions "here".
......
......@@ -36,7 +36,12 @@ text centered, text=black, text width=7cm]
\node (AuxNode) [above=of perPlugin]{};
\node (Core) [above=of perPlugin ,yshift=2.8cm] {\textbf{\huge{OpenFlipper Core}} };
\node (redraw) [abstract, rectangle, below= of perPlugin ]
\node (updateObject) [abstract, rectangle, below= of perPlugin ]
{
\textbf{Update Object}
};
\node (redraw) [abstract, rectangle, below= of updateObject ]
{
\textbf{Redraw Scene}
};
......@@ -46,16 +51,9 @@ text centered, text=black, text width=7cm]
\draw[flow] (ModifiedObject.south) -- ++(0,0) -| (signalUpdatedObject.north);
\draw[flow] (signalUpdatedObject.west) -- ++(0,0) -| (perPlugin.north);
\draw[flow] (perPlugin.south) -- ++(0,0) -| (redraw.north);
\draw[flow] (perPlugin.south) -- ++(0,0) -| (updateObject.north);
\draw[flow] (updateObject.south) -- ++(0,0) -| (redraw.north);
\draw[flow] (perPlugin.east) -- ++(0,0) |- (slotObjectUpdated.west);
%\draw[flow] (CreateGUI.south) -- ++(0,0) -| (Logging.north);
%\draw[flow] (Logging.south) -- ++(0,0) -| (LoadPlugins.north);
%\draw[flow] (LoadPlugins.south) -- +(0,0) |- (initializePlugin.west);
%\draw[flow] (LoadPlugins.south) -- ++(0,0) -| (perPlugin1.north);
%\draw[flow] (perPlugin1.south) -- ++(0,0) -| (perPlugin2.north);
%\draw[flow] (perPlugin1.east) -- ++(0,0) |- (pluginsInitialized.west);
%\draw[flow] (perPlugin2.south) -- ++(0,0) -| (finalizeGui.north);
%\draw[flow] (perPlugin2.east) -- ++(0,0) |- (loadIni.west);
\begin{pgfonlayer}{background}
\node[CoreGroup,fit=(Core) (redraw) ] (Core) {};
......
......@@ -282,6 +282,8 @@ class DLLEXPORTONLY BaseObject : public QObject {
* If the object changes, the core will call this function. Normally this will update
* the corresponding scenegraph nodes or trigger other data handling which has to be done
* when the object changes.
*
* \note Do not call this function yourself to avoid unnecessary overhead(the core will call it when it is required)
*/
virtual void update(UpdateType _type = UPDATE_ALL);
......
......@@ -295,6 +295,8 @@ class DLLEXPORT BaseObjectData : public BaseObject
* If the object changes, the core will call this function. Normally this will update
* the corresponding scenegraph nodes or trigger other data handling which has to be done
* when the object changes.
*
* \note Do not call this function yourself to avoid unnecessary overhead(the core will call it when it is required)
*/
virtual void update(UpdateType _type = UPDATE_ALL );
......
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