53 #ifndef TYPELIGHTPLUGIN_HH
54 #define TYPELIGHTPLUGIN_HH
80 #if QT_VERSION >= 0x050000
81 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-TypeLight")
86 void log(
Logtype _type, QString _message);
87 void log(QString _message);
90 void addEmptyObject(
DataType _type,
int& _id);
91 void emptyObjectAdded(
int _id );
92 void deleteObject(
int _id);
95 void updatedObject(
int _id,
const UpdateType& _type);
99 void getToolBar( QString _name, QToolBar*& _toolbar );
102 void addPickMode(
const std::string& _mode);
103 void addHiddenPickMode(
const std::string& _mode);
104 void setPickModeMouseTracking (
const std::string& _mode,
bool _mouseTracking);
105 void setPickModeToolbar(
const std::string& _mode, QToolBar * _toolbar);
110 void noguiSupported( ) {};
119 void addDefaultLights();
121 void removeDefaultLights();
159 QString
name() {
return (QString(
"TypeLight")); };
160 QString
description( ) {
return (QString(tr(
"Register Light type"))); };
167 QString version() {
return QString(
"1.0"); };
176 int addDefaultLight(QString _name);
178 void showReducedUi(
bool reduced);
182 void slotLightModeRequest(
bool _checked);
183 void slotPickModeRequest(QAction* _action);
185 void slotSetAllOrTarget(
bool _checked);
193 double getFarthestRadius();
210 QToolBar* lightOptions_;
213 QAction* lightAction_;
216 QAction* translateMode_;
217 QAction* rotateMode_;
219 QAction* allLightsMode_;
220 QAction* viewerToolbarAction_;
246 bool hitLightTrackball_;
251 #endif //TYPELIGHTPLUGIN_HH
void rotateLightDirection(ACG::Vec3d &_axis, double _angle)
Rotate spot light direction.
void pluginsInitialized()
Initialize Plugin step 2.
Interface class from which all plugins have to be created.
float findDepth()
Find depth of nearest light source.
int addEmpty()
Create an empty object.
Logtype
Log types for Message Window.
void slotPickModeChanged(const std::string &_pickMode)
The pickingMode has changed.
void addedEmptyObject(int _id)
An empty object has been added.
Interface for all Plugins which do logging to the logging window of the framework.
DataType supportedType()
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
std::vector< int > lightSources_
Count light sources in scene.
bool computeClickOnTrackball(const QPoint &_v2D, ACG::Vec3d &_clickOnSphere, ACG::GLState &_state)
Compute click on trackball containing the light source.
QString name()
Return a name for the plugin.
Add a toolbox to OpenFlipper.
void objectDeleted(int _id)
An object was deleted.
Interface for all plugins which want to Load or Save files and create Objects.
void rotateLights(ACG::Vec3d &_axis, double _angle)
Rotate light sources.
Allow access to picking functions.
Interface class for receiving mouse events.
QString description()
Return a description of what the plugin is doing.
void slotAllCleared()
Called if the whole scene is cleared.
Interface class for type definitions.
void updateLights()
Update light sources' positions.
bool computeClickOnLightTrackball(const QPoint &_v2D, ACG::Vec3d &_clickOnSphere, ACG::GLState &_state)
Compute click on trackball of light source.
void slotMouseEventLight(QMouseEvent *_event)
Mouse Event from main application ( Light Mode )
void addAssistLines()
Get number of non-directional light sources.