Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
TypeSplatCloud.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 // CLASS TypeSplatCloudPlugin
53 //
54 // This class represents an OpenFlipper plugin for a new node named SplatCloud.
55 //
56 //================================================================
57
58
59 #ifndef TYPESPLATCLOUDPLUGIN_HH
60 #define TYPESPLATCLOUDPLUGIN_HH
61
62
63 //== INCLUDES ====================================================
64
65
66 #include <QObject>
67
68 #include <OpenFlipper/BasePlugin/BaseInterface.hh>
69 #include <OpenFlipper/BasePlugin/LoadSaveInterface.hh>
70 #include <OpenFlipper/BasePlugin/LoggingInterface.hh>
71 #include <OpenFlipper/BasePlugin/TypeInterface.hh>
72 #include <OpenFlipper/BasePlugin/RPCInterface.hh>
73
74 #include <OpenFlipper/common/Types.hh>
75
76 #include <ObjectTypes/SplatCloud/SplatCloud.hh>
77 #include <ObjectTypes/Camera/Camera.hh>
78 #include <ObjectTypes/PolyMesh/PolyMesh.hh>
79
80
81 //== CLASS DEFINITION ============================================
82
83
84 class TypeSplatCloudPlugin : public QObject, BaseInterface, LoadSaveInterface, LoggingInterface, TypeInterface, RPCInterface
85 {
86 Q_OBJECT
87 Q_INTERFACES( BaseInterface )
88 Q_INTERFACES( LoadSaveInterface )
89 Q_INTERFACES( LoggingInterface )
90 Q_INTERFACES( TypeInterface )
91 Q_INTERFACES( RPCInterface )
92
93 #if QT_VERSION >= 0x050000
94 Q_PLUGIN_METADATA(IID "org.OpenFlipper.Plugins.Plugin-TypeSplatCloud")
95 #endif
96
97 signals:
98
99 //-- Type Interface --
100 void emptyObjectAdded( int _objectId );
101
102 //-- LoadSave Interface --
103 void addEmptyObject( DataType _type, int &_objectId );
104 void deleteObject( int _objectId );
105
106 //-- Logging Interface --
107 void log( QString _message );
108 void log( Logtype _type, QString _message );
109
110 public slots:
111
112 //-- Base Interface --
113 QString version() { return QString( "1.0" ); };
114
115 //-- Type Interface --
116 int addEmpty();
117 DataType supportedType() { return DATA_SPLATCLOUD; };
118 void generateBackup( int _objectId, QString _name, UpdateType _type );
119
120 private slots:
121
122 // -- Base Inferface --
123 void noguiSupported() { }
124 void slotViewChanged();
125 void slotObjectPropertiesChanged( int _objectId );
126 void slotObjectUpdated ( int _objectId, const UpdateType &_updateType );
127
128 //-- LoadSave Interface --
129 void objectDeleted( int _objectId );
130
131 public:
132
133 // standard constructor/destructor
134 TypeSplatCloudPlugin();
135 ~TypeSplatCloudPlugin() { }
136
137 //-- Base Interface --
138 QString name() { return QString( "TypeSplatCloud" ); };
139 QString description() { return QString( tr( "Register SplatCloud type" ) ); };
140
141 // -- Type Interface --
142 bool registerType();
143
144 private:
145
146 // ungroup group-object
147 void ungroupGroupObject( GroupObject *_groupObject );
148
149 // get group-objects
150 GroupObject *getCamerasGroupObject ( const SplatCloud_CameraManager &_cameraManager );
151 GroupObject *getClustersGroupObject( const SplatCloud_ClusterManager &_clusterManager );
152
153 // ungroup objects
154 void ungroupCameraObjects ( const SplatCloud_CameraManager &_cameraManager );
155 void ungroupClusterObjects( const SplatCloud_ClusterManager &_clusterManager );
156
157 // group objects
158 void groupCameraObjects ( const SplatCloud_CameraManager &_cameraManager );
159 void groupClusterObjects( const SplatCloud_ClusterManager &_clusterManager );
160
161 // add objects
162 void addCameraObjects ( SplatCloudObject *_splatCloudObject );
163 void addClusterObjects ( SplatCloudObject *_splatCloudObject );
164
165 // free objects
166 void freeCameraObjects ( SplatCloudObject *_splatCloudObject );
167 void freeClusterObjects( SplatCloudObject *_splatCloudObject );
168
169 // erase camera
170 void eraseCamera( CameraObject *_cameraObject );
171
172 ACG::SceneGraph::DrawModes::DrawMode splatsDrawMode_;
173 ACG::SceneGraph::DrawModes::DrawMode dotsDrawMode_;
174 };
175
176
177 //================================================================
178
179
180 #endif // TYPESPLATCLOUDPLUGIN_HH
BaseInterface
Interface class from which all plugins have to be created.
Definition: BaseInterface.hh:76
TypeInterface.hh
Logtype
Logtype
Log types for Message Window.
Definition: LoggingInterface.hh:103
Camera.hh
SplatCloudObject
Definition: SplatCloudObject.hh:82
UpdateType
Update type class.
Definition: UpdateType.hh:70
SplatCloud_ClusterManager
Definition: SplatCloudExtensions.hh:92
LoggingInterface.hh
LoggingInterface
Interface for all Plugins which do logging to the logging window of the framework.
Definition: LoggingInterface.hh:123
RPCInterface
Interface to call functions across plugins.
Definition: RPCInterface.hh:71
GroupObject
Definition: GroupObject.hh:83
ACG::SceneGraph::DrawModes::DrawMode
Specifies a DrawMode.
Definition: DrawModes.hh:294
TypeSplatCloudPlugin
Definition: TypeSplatCloud.hh:84
TypeSplatCloudPlugin::name
QString name()
Return a name for the plugin.
Definition: TypeSplatCloud.hh:138
LoadSaveInterface.hh
TypeSplatCloudPlugin::addEmpty
int addEmpty()
Create an empty object.
Definition: TypeSplatCloud.cc:289
TypeSplatCloudPlugin::generateBackup
void generateBackup(int _objectId, QString _name, UpdateType _type)
This slot should be implemented in a TypePlugin to generate type specific backups.
Definition: TypeSplatCloud.cc:338
RPCInterface.hh
TypeSplatCloudPlugin::description
QString description()
Return a description of what the plugin is doing.
Definition: TypeSplatCloud.hh:139
LoadSaveInterface
Interface for all plugins which want to Load or Save files and create Objects.
Definition: LoadSaveInterface.hh:68
SplatCloud.hh
DATA_SPLATCLOUD
#define DATA_SPLATCLOUD
Definition: SplatCloud.hh:65
PolyMesh.hh
CameraObject
Definition: CameraObject.hh:82
BaseInterface.hh
TypeSplatCloudPlugin::supportedType
DataType supportedType()
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
Definition: TypeSplatCloud.hh:117
SplatCloud_CameraManager
Definition: SplatCloudExtensions.hh:83
DataType
Predefined datatypes.
Definition: DataTypes.hh:96
TypeInterface
Interface class for type definitions.
Definition: TypeInterface.hh:73
Types.hh