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();
216 void showAreas( StatusBits _bits,
int _id ,
bool _state );
264 void setShader(
int _id, QString _drawMode, QString _name );
269 QString getUniformType(QString _shader, QString _uniform );
270 QString getUniformDefault(QString _shader, QString _uniform );
271 QString getUniformMin(QString _shader, QString _uniform );
272 QString getUniformMax(QString _shader, QString _uniform );
282 void setSceneRadius(
double _radius ,
int _viewer = PluginFunctions::ALL_VIEWERS );
285 void rotate(
Vector _axis,
double _angle,
Vector _center ,
int _viewer = PluginFunctions::ALL_VIEWERS );
288 void translate(
Vector _vec ,
int _viewer = PluginFunctions::ALL_VIEWERS );
291 void setDrawMode(QString _mode,
int _viewer = PluginFunctions::ALL_VIEWERS );
322 void setEyePosition(
Vector _eye);
359 void setTwoSidedLighting(
bool _enabled);
Logtype
Log types for Message Window.
Interface class from which all plugins have to be created.
Interface for all Plugins which do logging to the logging window of the framework.
Allow access to picking functions.
Interface class for exporting functions to python.
void setSceneCenter(Vector _center, int _viewer=PluginFunctions::ALL_VIEWERS)
Set the scene center.
void showSelection(int _id, bool _state)
Allows to enable/disable visualization of the objects selection for meshes.
void disableShader(int _objectId, ACG::SceneGraph::DrawModes::DrawMode _drawMode, ShaderInfo *_shader=0)
void viewAll()
Change View on all viewers to view whole scene.
void perspectiveProjection()
Change Viewer to perspectiveProjection.
void setViewingDirection(Vector _direction, Vector _upvector, int _viewer=PluginFunctions::ALL_VIEWERS)
Set the viewing direction.
void translate(Vector _vec, int _viewer=PluginFunctions::ALL_VIEWERS)
translate Scene
std::vector< ShaderInfo > shaderList_
void rotate(Vector _axis, double _angle, Vector _center, int _viewer=PluginFunctions::ALL_VIEWERS)
Rotate Scene.
Vector eyePosition(int _viewer=PluginFunctions::ACTIVE_VIEWER)
get a viewers eye Position
void showModelingAreas(int _id, bool _state)
Allows to enable/disable visualization of the objects modeling area for meshes.
Vector upVector(int _viewer=PluginFunctions::ACTIVE_VIEWER)
get a viewers up vector
void showAreas(StatusBits _bits, int _id, bool _state)
Show or hide modeling areas.
void setFOVY(double _fovy)
Set fovy angle of projection.
void viewHome()
Change View on given Viewer to view home position.
bool selectionVisible(int _id)
For meshes returns if the selection for this object is visible.
ACG::SceneGraph::DrawModes::DrawMode availDrawModes_
void setShader(int _id, ACG::SceneGraph::DrawModes::DrawMode _drawMode, ShaderInfo _shader)
ACG::SceneGraph::DrawModes::DrawMode activeDrawModes_
ACG::Vec3d project(ACG::Vec3d _point, int _viewerId=0)
Use the projection matrix of the given viewer to project the point.
void setUniform(int _objID, ACG::SceneGraph::DrawModes::DrawMode _drawMode, QString _shader, QString _uniform, QString _value)
set the value of a uniform in a shader for a specific drawMode
QString description()
Return a description of what the plugin is doing.
void setDrawMode(QString _mode, int _viewer=PluginFunctions::ALL_VIEWERS)
Set the draw mode for a viewer.
Vector viewingDirection(int _viewer=PluginFunctions::ACTIVE_VIEWER)
Get a viewers viewing direction.
bool modelingAreasVisible(int _id)
For meshes returns if the modeling areas for this object is visible.
void setObjectDrawMode(QString _mode, int _objectID, bool _force=true)
Set the draw mode for an object.
void setFeatureLineWidth(int _id, double _width)
Set the line width of the features.
void setCoordsysProjection(bool _orthogonal)
bool areasVisible(StatusBits _bits, int _id)
Return of all of the given modeling areas are visible.
void setSelectionLineWidth(int _id, double _width)
Set the line width of the selections.
void orthographicProjection()
Change Viewer to orthographicProjection.
void setSceneRadius(double _radius, int _viewer=PluginFunctions::ALL_VIEWERS)
Set scene radius.
QString name()
Return a name for the plugin.
void enableBackfaceCulling(bool _state, int _viewer=PluginFunctions::ALL_VIEWERS)
Enable or disable Backface culling.
QStringList getUniforms(QString _shader)
get information about available uniforms for a given shader
Vector sceneCenter(int _viewer=PluginFunctions::ACTIVE_VIEWER)
Get the scene center.