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();
224 void showAreas( StatusBits _bits,
int _id ,
bool _state );
266 void setShader(
int _id, QString _drawMode, QString _name );
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 );
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 );
324 void setEyePosition(
Vector _eye);
361 void setTwoSidedLighting(
bool _enabled);
365 #endif //ViewControlPlugin_HH
Add a toolbox to OpenFlipper.
Vector viewingDirection(int _viewer=PluginFunctions::ACTIVE_VIEWER)
Get a viewers viewing direction.
void rotate(Vector _axis, double _angle, Vector _center, int _viewer=PluginFunctions::ALL_VIEWERS)
Rotate Scene.
void setViewingDirection(Vector _direction, Vector _upvector, int _viewer=PluginFunctions::ALL_VIEWERS)
Set the viewing direction.
void setFOVY(double _fovy)
Set fovy angle of projection.
void translate(Vector _vec, int _viewer=PluginFunctions::ALL_VIEWERS)
translate Scene
Interface class for creating custom context menus.
void orthographicProjection()
Change Viewer to orthographicProjection.
Interface for all Plugins which do logging to the logging window of the framework.
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 setSceneRadius(double _radius, int _viewer=PluginFunctions::ALL_VIEWERS)
Set scene radius.
void setObjectDrawMode(QString _mode, int _objectID, bool _force=true)
Set the draw mode for an object.
ACG::SceneGraph::DrawModes::DrawMode availDrawModes_
void setSceneCenter(Vector _center, int _viewer=PluginFunctions::ALL_VIEWERS)
Set the scene center.
void viewAll()
Change View on all viewers to view whole scene.
void viewHome()
Change View on given Viewer to view home position.
ACG::SceneGraph::DrawModes::DrawMode activeDrawModes_
Interface class from which all plugins have to be created.
void perspectiveProjection()
Change Viewer to perspectiveProjection.
Logtype
Log types for Message Window.
bool modelingAreasVisible(int _id)
For meshes returns if the modeling areas for this object is visible.
void showModelingAreas(int _id, bool _state)
Allows to enable/disable visualization of the objects modeling area for meshes.
void showAreas(StatusBits _bits, int _id, bool _state)
Show or hide modeling areas.
Vector upVector(int _viewer=PluginFunctions::ACTIVE_VIEWER)
get a viewers up vector
void setDrawMode(QString _mode, int _viewer=PluginFunctions::ALL_VIEWERS)
Set the draw mode for a viewer.
Vector eyePosition(int _viewer=PluginFunctions::ACTIVE_VIEWER)
get a viewers eye Position
std::vector< ShaderInfo > shaderList_
void setShader(int _id, ACG::SceneGraph::DrawModes::DrawMode _drawMode, ShaderInfo _shader)
Vector sceneCenter(int _viewer=PluginFunctions::ACTIVE_VIEWER)
Get the scene center.
bool selectionVisible(int _id)
For meshes returns if the selection for this object is visible.
bool areasVisible(StatusBits _bits, int _id)
Return of all of the given modeling areas are visible.
void enableBackfaceCulling(bool _state, int _viewer=PluginFunctions::ALL_VIEWERS)
Enable or disable Backface culling.
QString description()
Return a description of what the plugin is doing.
Allow access to picking functions.
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
QStringList getUniforms(QString _shader)
get information about available uniforms for a given shader
QString name()
Return a name for the plugin.
void setCoordsysProjection(bool _orthogonal)