47 #ifndef TYPELIGHTPLUGIN_HH 48 #define TYPELIGHTPLUGIN_HH 74 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-TypeLight")
78 void log(
Logtype _type, QString _message);
79 void log(QString _message);
82 void addEmptyObject(
DataType _type,
int& _id);
83 void emptyObjectAdded(
int _id );
84 void deleteObject(
int _id);
87 void updatedObject(
int _id,
const UpdateType& _type);
91 void getToolBar( QString _name, QToolBar*& _toolbar );
94 void addPickMode(
const std::string& _mode);
95 void addHiddenPickMode(
const std::string& _mode);
96 void setPickModeMouseTracking (
const std::string& _mode,
bool _mouseTracking);
97 void setPickModeToolbar(
const std::string& _mode, QToolBar * _toolbar);
102 void noguiSupported( ) {};
111 void addDefaultLights();
113 void removeDefaultLights();
151 QString
name() {
return (QString(
"TypeLight")); };
152 QString
description( ) {
return (QString(tr(
"Register Light type"))); };
159 QString version() {
return QString(
"1.0"); };
168 int addDefaultLight(QString _name);
170 void showReducedUi(
bool reduced);
174 void slotLightModeRequest(
bool _checked);
175 void slotPickModeRequest(QAction* _action);
177 void slotSetAllOrTarget(
bool _checked);
185 double getFarthestRadius();
202 QToolBar* lightOptions_;
205 QAction* lightAction_;
208 QAction* translateMode_;
209 QAction* rotateMode_;
211 QAction* allLightsMode_;
212 QAction* viewerToolbarAction_;
238 bool hitLightTrackball_;
243 #endif //TYPELIGHTPLUGIN_HH QString description()
Return a description of what the plugin is doing.
void slotAllCleared()
Called if the whole scene is cleared.
void addedEmptyObject(int _id)
An empty object has been added.
Logtype
Log types for Message Window.
void rotateLights(ACG::Vec3d &_axis, double _angle)
Rotate light sources.
Interface for all plugins which want to Load or Save files and create Objects.
Interface class for type definitions.
bool computeClickOnTrackball(const QPoint &_v2D, ACG::Vec3d &_clickOnSphere, ACG::GLState &_state)
Compute click on trackball containing the light source.
void updateLights()
Update light sources' positions.
void slotPickModeChanged(const std::string &_pickMode)
The pickingMode has changed.
Interface class for receiving mouse events.
Interface for all Plugins which do logging to the logging window of the framework.
void rotateLightDirection(ACG::Vec3d &_axis, double _angle)
Rotate spot light direction.
DataType supportedType()
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
Allow access to picking functions.
void addAssistLines()
Get number of non-directional light sources.
Interface class from which all plugins have to be created.
Add a toolbox to OpenFlipper.
QString name()
Return a name for the plugin.
void objectDeleted(int _id)
An object was deleted.
bool computeClickOnLightTrackball(const QPoint &_v2D, ACG::Vec3d &_clickOnSphere, ACG::GLState &_state)
Compute click on trackball of light source.
std::vector< int > lightSources_
Count light sources in scene.
void pluginsInitialized()
Initialize Plugin step 2.
void slotMouseEventLight(QMouseEvent *_event)
Mouse Event from main application ( Light Mode )
int addEmpty()
Create an empty object.
float findDepth()
Find depth of nearest light source.