Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
PluginFunctionsCore.hh
1 /*===========================================================================*\
2 * *
3 * OpenFlipper *
4  * Copyright (c) 2001-2015, RWTH-Aachen University *
5  * Department of Computer Graphics and Multimedia *
6  * All rights reserved. *
7  * www.openflipper.org *
8  * *
9  *---------------------------------------------------------------------------*
10  * This file is part of OpenFlipper. *
11  *---------------------------------------------------------------------------*
12  * *
13  * Redistribution and use in source and binary forms, with or without *
14  * modification, are permitted provided that the following conditions *
15  * are met: *
16  * *
17  * 1. Redistributions of source code must retain the above copyright notice, *
18  * this list of conditions and the following disclaimer. *
19  * *
20  * 2. Redistributions in binary form must reproduce the above copyright *
21  * notice, this list of conditions and the following disclaimer in the *
22  * documentation and/or other materials provided with the distribution. *
23  * *
24  * 3. Neither the name of the copyright holder nor the names of its *
25  * contributors may be used to endorse or promote products derived from *
26  * this software without specific prior written permission. *
27  * *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
30  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
31  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
32  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
33  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
34  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
35  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
36  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
37  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
38  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
39 * *
40 \*===========================================================================*/
41 
42 /*===========================================================================*\
43 * *
44 * $Revision$ *
45 * $LastChangedBy$ *
46 * $Date$ *
47 * *
48 \*===========================================================================*/
49 
50 
51 
52 
53 //=============================================================================
54 //
55 // Standard Functions
56 //
57 //=============================================================================
58 
65 //
66 #ifndef PLUGINFUNCTIONSCORE_HH
67 #define PLUGINFUNCTIONSCORE_HH
68 
69 #ifndef OPENFLIPPERCORE
70  #ifndef OPENFLIPPERPLUGINLIB
71  #ifdef WIN32
72  #pragma message("PluginFunctionsCore is only allowed to be used from within OpenFlippers Core application!")
73 
74  #else
75  #warning PluginFunctionsCore is only allowed to be used from within OpenFlippers Core application!
76  #error Bla
77  #endif
78  #endif
79 #endif
80 
82 
83 #include <OpenFlipper/widgets/glWidget/QtBaseViewer.hh>
85 
86 #include <ACG/QtWidgets/QtSceneGraphWidget.hh>
87 
88 namespace PluginFunctions {
89 
90 //=======================================
91 // Set pointers for global handling in PluginFunctions without exporting them to the Plugins
94 //=======================================
97 void setViewers( std::vector< glViewer* > _viewerWidgets );
98 
100 DLLEXPORT
101 glViewer* viewer(int _viewerId );
102 
104 DLLEXPORT
105 void setViewerProperties( std::vector< Viewer::ViewerProperties* > _viewerProperties );
106 
110 DLLEXPORT
111 void setSceneGraphRootNode( SeparatorNode* _root_node );
112 
118 DLLEXPORT
119 void setSceneGraphRootNodeGlobal( SeparatorNode* _root_node );
120 
122 DLLEXPORT
123 void setDataSeparatorNodes( SeparatorNode* _dataRootNode );
124 
127 //=======================================
128 // Handle object count internally
131 //=======================================
133 DLLEXPORT
134 void increaseObjectCount();
135 
137 DLLEXPORT
138 void decreaseObjectCount();
139 
141 DLLEXPORT
142 void increaseTargetCount();
143 
145 DLLEXPORT
146 void decreaseTargetCount();
147 
150 //=======================================
151 // Object container functions
154 //=======================================
155 
157 DLLEXPORT
158 void addObjectToMap(int _objectId, BaseObject* _object);
159 
161 DLLEXPORT
162 void removeObjectFromMap(int _objectId);
163 
166 //=======================================
167 // SceneGraph Generator Map
170 //=======================================
171 
173 DLLEXPORT
175 
176 DLLEXPORT
177 QMap< std::string ,ACG::QtWidgets::SceneGraphWidgetGenerator* > getSceneGraphGeneratorList();
178 
181 }
182 
183 #endif //PLUGINFUNCTIONSCORE_HH
void decreaseObjectCount()
Increase the number of current Object.
void setViewerProperties(std::vector< Viewer::ViewerProperties * > _viewerProperties)
Set the internal viewerProperties pointer ( DO NOT USE!! )
void setSceneGraphRootNode(SeparatorNode *_root_node)
void decreaseTargetCount()
Increase the number of current Object.
QMap< std::string,ACG::QtWidgets::SceneGraphWidgetGenerator * > getSceneGraphGeneratorList()
Add a scenegraph generator ( the handled type will be extracted from the generator) ...
void setSceneGraphRootNodeGlobal(SeparatorNode *_root_node)
void increaseTargetCount()
Decrease the number of current Object.
void setViewers(std::vector< glViewer * > _viewerWidgets)
Set the internal Viewer pointer ( DO NOT USE!! )
void addObjectToMap(int _objectId, BaseObject *_object)
Add object to internal object map.
void increaseObjectCount()
Decrease the number of current Object.
#define DLLEXPORT
void addSceneGraphGenerator(ACG::QtWidgets::SceneGraphWidgetGenerator *_generator)
Add a scenegraph generator ( the handled type will be extracted from the generator) ...
glViewer * viewer(int _viewerId)
Get a Viewer.
void removeObjectFromMap(int _objectId)
Remove object from internal object map.
void setDataSeparatorNodes(SeparatorNode *_dataSeparatorNode)
Set the internal data root node pointers ( DO NOT USE!! )