50 #ifndef ViewControlPlugin_HH 51 #define ViewControlPlugin_HH 65 #include "shaderWidget.hh" 77 QString fragmentShader;
79 QString pickVertexShader;
80 QString pickFragmentShader;
84 QStringList uniformTypes;
85 QStringList uniformsDefault;
86 QStringList uniformsMax;
87 QStringList uniformsMin;
99 #if QT_VERSION >= 0x050000 100 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-ViewControl")
108 void addHiddenPickMode(
const std::string& _mode );
111 void log(
Logtype _type, QString _message);
112 void log(QString _message);
115 void addToolbar(QToolBar* _toolbar);
116 void getToolBar(QString _name, QToolBar*& _toolbar);
121 void hideContextMenu();
123 void setSlotDescription(QString _slotName, QString _slotDescription,
124 QStringList _parameters, QStringList _descriptions);
128 void pluginsInitialized();
130 void contextMenuTriggered(QAction* _action);
132 void slotUpdateContextMenu(
int _objectId );
140 QString
name() {
return (QString(
"ViewControl")); };
141 QString
description( ) {
return (QString(
"Control the current or global visualization settings")); };
145 QMenu* viewControlMenu_;
166 QActionGroup* toolbarViewingDirections_;
168 QAction* viewBottom_;
174 std::map<QCheckBox*, ACG::SceneGraph::DrawModes::DrawMode> activeCheckboxes;
177 QString version() {
return QString(
"1.0"); };
180 void slotDrawModeSelected( QAction * _action );
183 void slotShaderClicked( QListWidgetItem * _item );
186 void slotShaderDoubleClicked( QListWidgetItem * _item );
189 void slotSetShader();
192 void itemChanged(QTableWidgetItem* item);
195 void setView(
int _mode,
int _viewer = PluginFunctions::ACTIVE_VIEWER );
198 void setView(QAction* _action);
202 void updateShaderList();
205 void initShaderWidget();
208 void setDescriptions();
216 bool areasVisible( StatusBits _bits,
int _id );
224 void showAreas( StatusBits _bits,
int _id ,
bool _state );
229 bool selectionVisible(
int _id );
232 void showSelection(
int _id ,
bool _state );
235 bool modelingAreasVisible(
int _id );
238 void showModelingAreas(
int _id ,
bool _state );
266 void setShader(
int _id, QString _drawMode, QString _name );
269 QStringList getUniforms(QString _shader);
271 QString getUniformType(QString _shader, QString _uniform );
272 QString getUniformDefault(QString _shader, QString _uniform );
273 QString getUniformMin(QString _shader, QString _uniform );
274 QString getUniformMax(QString _shader, QString _uniform );
281 void setViewingDirection(
Vector _direction,
Vector _upvector ,
int _viewer = PluginFunctions::ALL_VIEWERS );
284 void setSceneRadius(
double _radius ,
int _viewer = PluginFunctions::ALL_VIEWERS );
287 void rotate(
Vector _axis,
double _angle,
Vector _center ,
int _viewer = PluginFunctions::ALL_VIEWERS );
290 void translate(
Vector _vec ,
int _viewer = PluginFunctions::ALL_VIEWERS );
293 void setDrawMode(QString _mode,
int _viewer = PluginFunctions::ALL_VIEWERS );
303 void setObjectDrawMode(QString _mode,
int _objectID ,
bool _force =
true );
306 Vector viewingDirection(
int _viewer = PluginFunctions::ACTIVE_VIEWER );
309 Vector upVector(
int _viewer = PluginFunctions::ACTIVE_VIEWER );
312 Vector eyePosition(
int _viewer = PluginFunctions::ACTIVE_VIEWER );
315 Vector sceneCenter(
int _viewer = PluginFunctions::ACTIVE_VIEWER );
318 void setSceneCenter(
Vector _center,
int _viewer = PluginFunctions::ALL_VIEWERS );
321 void enableBackfaceCulling(
bool _state ,
int _viewer = PluginFunctions::ALL_VIEWERS );
324 void setEyePosition(
Vector _eye);
330 void viewAll(
int _viewer);
336 void viewHome(
int _viewer);
341 void orthographicProjection();
344 void orthographicProjection(
int _viewer);
349 void perspectiveProjection();
352 void perspectiveProjection(
int _viewer);
355 void setFOVY(
double _fovy );
359 void setCoordsysProjection(
bool _orthogonal);
361 void setTwoSidedLighting(
bool _enabled);
365 #endif //ViewControlPlugin_HH ACG::SceneGraph::DrawModes::DrawMode activeDrawModes_
std::vector< ShaderInfo > shaderList_
Interface class for creating custom context menus.
Logtype
Log types for Message Window.
QString name()
Return a name for the plugin.
Interface class from which all plugins have to be created.
Interface for all Plugins which do logging to the logging window of the framework.
ACG::SceneGraph::DrawModes::DrawMode availDrawModes_
QString description()
Return a description of what the plugin is doing.
Add a toolbox to OpenFlipper.
Allow access to picking functions.