58 #include "shaderWidget.hh" 70 QString fragmentShader;
72 QString pickVertexShader;
73 QString pickFragmentShader;
77 QStringList uniformTypes;
78 QStringList uniformsDefault;
79 QStringList uniformsMax;
80 QStringList uniformsMin;
93 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-ViewControl")
100 void addHiddenPickMode(
const std::string& _mode );
103 void log(
Logtype _type, QString _message);
104 void log(QString _message);
107 void addToolbar(QToolBar* _toolbar);
108 void getToolBar(QString _name, QToolBar*& _toolbar);
113 void hideContextMenu();
115 void setSlotDescription(QString _slotName, QString _slotDescription,
116 QStringList _parameters, QStringList _descriptions);
120 void pluginsInitialized();
122 void contextMenuTriggered(QAction* _action);
124 void slotUpdateContextMenu(
int _objectId );
132 QString
name() {
return (QString(
"ViewControl")); };
133 QString
description( ) {
return (QString(
"Control the current or global visualization settings")); };
137 QMenu* viewControlMenu_;
158 QActionGroup* toolbarViewingDirections_;
160 QAction* viewBottom_;
166 std::map<QCheckBox*, ACG::SceneGraph::DrawModes::DrawMode> activeCheckboxes;
169 QString version() {
return QString(
"1.0"); };
172 void slotDrawModeSelected( QAction * _action );
175 void slotShaderClicked( QListWidgetItem * _item );
178 void slotShaderDoubleClicked( QListWidgetItem * _item );
181 void slotSetShader();
184 void itemChanged(QTableWidgetItem* item);
187 void setView(
int _mode,
int _viewer = PluginFunctions::ACTIVE_VIEWER );
190 void setView(QAction* _action);
194 void updateShaderList();
197 void initShaderWidget();
200 void setDescriptions();
208 bool areasVisible( StatusBits _bits,
int _id );
216 void showAreas( StatusBits _bits,
int _id ,
bool _state );
221 bool selectionVisible(
int _id );
224 void showSelection(
int _id ,
bool _state );
227 bool modelingAreasVisible(
int _id );
230 void showModelingAreas(
int _id ,
bool _state );
258 void setShader(
int _id, QString _drawMode, QString _name );
261 QStringList getUniforms(QString _shader);
263 QString getUniformType(QString _shader, QString _uniform );
264 QString getUniformDefault(QString _shader, QString _uniform );
265 QString getUniformMin(QString _shader, QString _uniform );
266 QString getUniformMax(QString _shader, QString _uniform );
273 void setViewingDirection(
Vector _direction,
Vector _upvector ,
int _viewer = PluginFunctions::ALL_VIEWERS );
276 void setSceneRadius(
double _radius ,
int _viewer = PluginFunctions::ALL_VIEWERS );
279 void rotate(
Vector _axis,
double _angle,
Vector _center ,
int _viewer = PluginFunctions::ALL_VIEWERS );
282 void translate(
Vector _vec ,
int _viewer = PluginFunctions::ALL_VIEWERS );
285 void setDrawMode(QString _mode,
int _viewer = PluginFunctions::ALL_VIEWERS );
295 void setObjectDrawMode(QString _mode,
int _objectID ,
bool _force =
true );
298 Vector viewingDirection(
int _viewer = PluginFunctions::ACTIVE_VIEWER );
301 Vector upVector(
int _viewer = PluginFunctions::ACTIVE_VIEWER );
304 Vector eyePosition(
int _viewer = PluginFunctions::ACTIVE_VIEWER );
307 Vector sceneCenter(
int _viewer = PluginFunctions::ACTIVE_VIEWER );
310 void setSceneCenter(
Vector _center,
int _viewer = PluginFunctions::ALL_VIEWERS );
313 void enableBackfaceCulling(
bool _state ,
int _viewer = PluginFunctions::ALL_VIEWERS );
316 void setEyePosition(
Vector _eye);
322 void viewAll(
int _viewer);
328 void viewHome(
int _viewer);
333 void orthographicProjection();
336 void orthographicProjection(
int _viewer);
341 void perspectiveProjection();
344 void perspectiveProjection(
int _viewer);
347 void setFOVY(
double _fovy );
351 void setCoordsysProjection(
bool _orthogonal);
353 void setTwoSidedLighting(
bool _enabled);
Interface class for creating custom context menus.
ACG::SceneGraph::DrawModes::DrawMode activeDrawModes_
std::vector< ShaderInfo > shaderList_
Logtype
Log types for Message Window.
QString description()
Return a description of what the plugin is doing.
ACG::SceneGraph::DrawModes::DrawMode availDrawModes_
Interface for all Plugins which do logging to the logging window of the framework.
Allow access to picking functions.
Interface class from which all plugins have to be created.
Add a toolbox to OpenFlipper.
QString name()
Return a name for the plugin.
Interface class for exporting functions to python.