Developer Documentation
|
Public Slots | |
QString | version () |
Signals | |
void | log (Logtype _type, QString _message) |
void | log (QString _message) |
void | addEmptyObject (DataType _type, int &_id) |
void | emptyObjectAdded (int _id) |
void | deleteObject (int _id) |
void | updatedObject (int _id, const UpdateType &_type) |
void | updateView () |
void | getToolBar (QString _name, QToolBar *&_toolbar) |
void | addPickMode (const std::string &_mode) |
void | addHiddenPickMode (const std::string &_mode) |
void | setPickModeMouseTracking (const std::string &_mode, bool _mouseTracking) |
void | setPickModeToolbar (const std::string &_mode, QToolBar *_toolbar) |
![]() | |
virtual void | updateView () |
Update current view in Main Application. More... | |
virtual void | setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions) |
Set a description for a public slot. More... | |
virtual void | setRenderer (unsigned int _viewer, QString _rendererName) |
Set a renderer for the given viewer. More... | |
![]() | |
virtual void | save (int _id, QString _filename) |
Save object to a file. More... | |
virtual void | load (QString _filename, DataType _type, int &_id) |
Load object from file with a specific DataType. More... | |
![]() | |
virtual void | log (Logtype _type, QString _message)=0 |
virtual void | log (QString _message)=0 |
![]() | |
virtual void | emptyObjectAdded (int _id) |
Emit this signal if an empty object has been created. More... | |
![]() | |
virtual void | addToolbar (QToolBar *_toolbar) |
Adds a Toolbar to the main widget. More... | |
![]() | |
virtual void | addPickMode (const std::string &_mode) |
Add a new picking mode to the examiner. More... | |
![]() | |
virtual void | executePythonScript (QString _script) |
Public Member Functions | |
QString | name () |
Return a name for the plugin. More... | |
QString | description () |
Return a description of what the plugin is doing. More... | |
bool | registerType () |
int | addEmpty () |
Create an empty object. More... | |
DataType | supportedType () |
Return your supported object type( e.g. DATA_TRIANGLE_MESH ) More... | |
void | pluginsInitialized () |
Initialize Plugin step 2. More... | |
int | addDefaultLight (QString _name) |
void | showReducedUi (bool reduced) |
Private Slots | |
void | noguiSupported () |
void | slotLightModeRequest (bool _checked) |
void | slotPickModeRequest (QAction *_action) |
void | slotSetAllOrTarget (bool _checked) |
![]() | |
virtual void | exit () |
virtual QString | version () |
Return a version string for your plugin. More... | |
![]() | |
virtual bool | registerType ()=0 |
virtual int | addEmpty ()=0 |
Create an empty object. More... | |
virtual DataType | supportedType ()=0 |
Return your supported object type( e.g. DATA_TRIANGLE_MESH ) More... | |
virtual void | generateBackup (int _id, QString _name, UpdateType _type) |
This slot should be implemented in a TypePlugin to generate type specific backups. More... | |
Private Member Functions | |
void | slotPickModeChanged (const std::string &_pickMode) |
The pickingMode has changed. More... | |
void | slotAllCleared () |
Called if the whole scene is cleared. More... | |
void | addDefaultLights () |
void | removeDefaultLights () |
void | addedEmptyObject (int _id) |
An empty object has been added. More... | |
void | objectDeleted (int _id) |
An object was deleted. More... | |
void | slotMouseEventLight (QMouseEvent *_event) |
Mouse Event from main application ( Light Mode ) More... | |
void | rotateLights (ACG::Vec3d &_axis, double _angle) |
Rotate light sources. More... | |
void | rotateLightDirection (ACG::Vec3d &_axis, double _angle) |
Rotate spot light direction. More... | |
void | updateLights () |
Update light sources' positions. More... | |
bool | computeClickOnTrackball (const QPoint &_v2D, ACG::Vec3d &_clickOnSphere, ACG::GLState &_state) |
Compute click on trackball containing the light source. More... | |
bool | computeClickOnLightTrackball (const QPoint &_v2D, ACG::Vec3d &_clickOnSphere, ACG::GLState &_state) |
Compute click on trackball of light source. More... | |
float | findDepth () |
Find depth of nearest light source. More... | |
double | getFarthestRadius () |
void | addAssistLines () |
Get number of non-directional light sources. | |
![]() | |
virtual void | noguiSupported () |
virtual | ~BaseInterface () |
Destructor. More... | |
virtual void | blockScenegraphUpdates (bool _block) |
Tell the core to prevent scenegraph updates. More... | |
virtual void | updatedObject (int _objectId) |
An object has been changed or added by this plugin. More... | |
virtual void | updatedObject (int _identifier, const UpdateType &_type) |
An object has been changed or added by this plugin. More... | |
virtual void | nodeVisibilityChanged (int _identifier) |
A scenegraph node has been shown or hidden. More... | |
virtual void | getCurrentRenderer (unsigned int _viewer, QString &_rendererName) |
Get the current renderer for the given viewer. More... | |
![]() | |
virtual | ~LoadSaveInterface () |
Destructor. More... | |
virtual void | addEmptyObject (DataType _type, int &_id) |
virtual void | copyObject (int _oldId, int &_newId) |
virtual void | emptyObjectAdded (int _id) |
DEPRECATED HERE (Moved to Type Interface)! Emit this signal if an empty object has been created. More... | |
virtual void | deleteObject (int _id) |
Delete an object This signal can be called from any thread. . More... | |
virtual void | deleteAllObjects () |
Delete all Objects. More... | |
virtual void | getAllFileFilters (QStringList &_filters) |
Get all file filters that are registered. More... | |
![]() | |
virtual | ~LoggingInterface () |
Destructor. More... | |
![]() | |
virtual | ~TypeInterface () |
Destructor. More... | |
![]() | |
virtual | ~MouseInterface () |
Destructor. More... | |
![]() | |
virtual | ~ToolbarInterface () |
Destructor. More... | |
virtual void | removeToolbar (QToolBar *_toolbar) |
Remove a Toolbar from the main widget. More... | |
virtual void | getToolBar (QString _name, QToolBar *&_toolbar) |
Get a pointer to a Toolbar of the given name or 0 if it does not exist. More... | |
![]() | |
virtual void | addHiddenPickMode (const std::string &_mode) |
Add a new picking mode to the examiner which will be invisible. More... | |
virtual void | setPickModeCursor (const std::string &_mode, QCursor _cursor) |
Set the cursor of the given PickMode. More... | |
virtual void | setPickModeMouseTracking (const std::string &_mode, bool _mouseTracking) |
Set mouse tracking for the given PickMode. More... | |
virtual void | setPickModeToolbar (const std::string &_mode, QToolBar *_toolbar) |
Set the additional toolbar of the given PickMode. More... | |
virtual void | removePickModeToolbar (const std::string &_mode) |
Removes the additional toolbar of the given PickMode. More... | |
virtual | ~PickingInterface () |
Destructor. More... | |
![]() | |
virtual void | openPythonScriptInEditor (QString _script) |
virtual | ~PythonInterface () |
Destructor. More... | |
Private Attributes | |
std::vector< int > | lightSources_ |
Count light sources in scene. More... | |
bool | defaultLights_ |
ACG::GLMatrixd | light_matrix_ |
QToolBar * | toolbar_ |
QToolBar * | lightOptions_ |
QAction * | lightAction_ |
QAction * | moveMode_ |
QAction * | translateMode_ |
QAction * | rotateMode_ |
QAction * | allLightsMode_ |
QAction * | viewerToolbarAction_ |
bool | onlyTargets_ |
QPoint | lastPoint2D_ |
ACG::Vec3d | lastPoint3D_ |
float | planeDepth_ |
ACG::Vec3d | transVec_ |
bool | rotation_ |
double | radius_ |
float | depth_ |
ACG::Vec3d | lightCenter_ |
double | lightRadius_ |
int | lightId_ |
bool | hitLightTrackball_ |
bool | hitTrackball_ |
Definition at line 63 of file TypeLight.hh.
|
inline |
Definition at line 150 of file TypeLight.hh.
TypeLightPlugin::TypeLightPlugin | ( | ) |
Definition at line 51 of file TypeLight.cc.
int TypeLightPlugin::addDefaultLight | ( | QString | _name | ) |
Definition at line 350 of file TypeLight.cc.
|
private |
Definition at line 107 of file TypeLight.cc.
|
privatevirtual |
An empty object has been added.
Slot is called if an empty object has been added by the core.
This slot will be executed on the main thread.
_id | Id of the new object |
Reimplemented from LoadSaveInterface.
Definition at line 393 of file TypeLight.cc.
|
virtual |
Create an empty object.
When this slot is called you have to create an object of your supported type.
Implements TypeInterface.
Definition at line 369 of file TypeLight.cc.
|
private |
Compute click on trackball of light source.
Compute click on trackball having the light's center as center point.
Definition at line 701 of file TypeLight.cc.
|
private |
Compute click on trackball containing the light source.
Compute click on trackball having the trackball center of the scene as center point.
Definition at line 670 of file TypeLight.cc.
|
inlinevirtual |
Return a description of what the plugin is doing.
This function has to return a basic description of the plugin
Implements BaseInterface.
Definition at line 154 of file TypeLight.hh.
|
private |
Find depth of nearest light source.
Definition at line 424 of file TypeLight.cc.
|
private |
Definition at line 455 of file TypeLight.cc.
|
inlinevirtual |
Return a name for the plugin.
This Function has to return the name of the plugin.
Implements BaseInterface.
Definition at line 153 of file TypeLight.hh.
|
inlineprivateslot |
Definition at line 104 of file TypeLight.hh.
|
privatevirtual |
An object was deleted.
This function is called by the core if an object gets deleted. It is called immediately before the object is removed from the scenegraph. So if this function is invoked, the object still exists. All plugins get informed via this slot.\
After this function got called for all plugins, the object is removed from the scene with all nodes attached to it and all PerObjectData attached to it.
This slot will be executed on the main thread.
_id | Id of the object that is deleted. |
Reimplemented from LoadSaveInterface.
Definition at line 412 of file TypeLight.cc.
|
virtual |
Initialize Plugin step 2.
This slot is called if all plugins are loaded and the core is ready. Afterwards you can already send signals to other plugins and the core (e.g. adding global textures).
Reimplemented from BaseInterface.
Definition at line 195 of file TypeLight.cc.
|
virtual |
Implements TypeInterface.
Definition at line 78 of file TypeLight.cc.
|
private |
Definition at line 91 of file TypeLight.cc.
|
private |
Rotate spot light direction.
Definition at line 741 of file TypeLight.cc.
|
private |
Rotate light sources.
Definition at line 732 of file TypeLight.cc.
void TypeLightPlugin::showReducedUi | ( | bool | reduced | ) |
Definition at line 191 of file TypeLight.cc.
|
privatevirtual |
Called if the whole scene is cleared.
This slot is called if the main application cleared the whole scene. No objects will remain in memory and all destructors of the objects are called before this signal is emitted.
Reimplemented from BaseInterface.
Definition at line 85 of file TypeLight.cc.
|
privateslot |
Definition at line 301 of file TypeLight.cc.
|
privatevirtual |
Mouse Event from main application ( Light Mode )
This slot is called if a mouse event occurred in the Viewer This slot will only get called in LightMode. Right button clicks will not be passed to the plugins as this is reserved for the context Menu.
_event | Mouse event |
Reimplemented from MouseInterface.
Definition at line 483 of file TypeLight.cc.
|
privatevirtual |
The pickingMode has changed.
This slot is called if the user changes the current picking mode
_mode | Identifier of Picking mode |
Reimplemented from PickingInterface.
Definition at line 295 of file TypeLight.cc.
|
privateslot |
Definition at line 314 of file TypeLight.cc.
|
privateslot |
Definition at line 344 of file TypeLight.cc.
|
inlinevirtual |
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
The function is used from addEmpty in the core to check if your plugin can create an object of a given dataType. If so, your addEmpty function will be invoked to create it.
Implements TypeInterface.
Definition at line 165 of file TypeLight.hh.
|
private |
Update light sources' positions.
Definition at line 769 of file TypeLight.cc.
|
inlineslot |
Definition at line 161 of file TypeLight.hh.
|
private |
Definition at line 213 of file TypeLight.hh.
|
private |
Definition at line 195 of file TypeLight.hh.
|
private |
Definition at line 233 of file TypeLight.hh.
|
private |
Definition at line 240 of file TypeLight.hh.
|
private |
Definition at line 241 of file TypeLight.hh.
|
private |
Definition at line 220 of file TypeLight.hh.
|
private |
Definition at line 221 of file TypeLight.hh.
|
private |
Definition at line 198 of file TypeLight.hh.
|
private |
Definition at line 207 of file TypeLight.hh.
|
private |
Definition at line 236 of file TypeLight.hh.
|
private |
Definition at line 238 of file TypeLight.hh.
|
private |
Definition at line 204 of file TypeLight.hh.
|
private |
Definition at line 237 of file TypeLight.hh.
|
private |
Count light sources in scene.
Definition at line 193 of file TypeLight.hh.
|
private |
Definition at line 209 of file TypeLight.hh.
|
private |
Definition at line 217 of file TypeLight.hh.
|
private |
Definition at line 225 of file TypeLight.hh.
|
private |
Definition at line 230 of file TypeLight.hh.
|
private |
Definition at line 211 of file TypeLight.hh.
|
private |
Definition at line 227 of file TypeLight.hh.
|
private |
Definition at line 201 of file TypeLight.hh.
|
private |
Definition at line 210 of file TypeLight.hh.
|
private |
Definition at line 226 of file TypeLight.hh.
|
private |
Definition at line 214 of file TypeLight.hh.