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 objectDeleted(int _id)
An object was deleted.
Interface class for receiving mouse events.
Logtype
Log types for Message Window.
std::vector< int > lightSources_
Count light sources in scene.
Interface class for type definitions.
void slotAllCleared()
Called if the whole scene is cleared.
QString description()
Return a description of what the plugin is doing.
Interface class from which all plugins have to be created.
void addedEmptyObject(int _id)
An empty object has been added.
Interface for all Plugins which do logging to the logging window of the framework.
void slotPickModeChanged(const std::string &_pickMode)
The pickingMode has changed.
void slotMouseEventLight(QMouseEvent *_event)
Mouse Event from main application ( Light Mode )
bool computeClickOnLightTrackball(const QPoint &_v2D, ACG::Vec3d &_clickOnSphere, ACG::GLState &_state)
Compute click on trackball of light source.
DataType supportedType()
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
void updateLights()
Update light sources' positions.
void pluginsInitialized()
Initialize Plugin step 2.
void rotateLightDirection(ACG::Vec3d &_axis, double _angle)
Rotate spot light direction.
bool computeClickOnTrackball(const QPoint &_v2D, ACG::Vec3d &_clickOnSphere, ACG::GLState &_state)
Compute click on trackball containing the light source.
float findDepth()
Find depth of nearest light source.
Interface for all plugins which want to Load or Save files and create Objects.
QString name()
Return a name for the plugin.
void addAssistLines()
Get number of non-directional light sources.
void rotateLights(ACG::Vec3d &_axis, double _angle)
Rotate light sources.
int addEmpty()
Create an empty object.
Add a toolbox to OpenFlipper.
Allow access to picking functions.