Developer Documentation
|
Plugin to visualize information about objects in the scene. More...
#include <Plugin-InfoMeshObject/MeshObjectInfoPlugin.hh>
Signals | |
void | setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions) |
void | log (Logtype _type, QString _message) |
void | log (QString _message) |
void | addWidgetToStatusbar (QWidget *_widget) |
Signals inherited from BaseInterface | |
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... | |
Signals inherited from LoggingInterface | |
virtual void | log (Logtype _type, QString _message)=0 |
virtual void | log (QString _message)=0 |
Signals inherited from StatusbarInterface | |
virtual void | showStatusMessage (QString _message, int _timeout=0) |
Show a message in the status bar. More... | |
Signals inherited from LoadSaveInterface | |
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... | |
Public Member Functions | |
QString | name () |
Name of the Plugin. | |
QString | description () |
Description of the Plugin. | |
Private Slots | |
void | initializePlugin () |
void | pluginsInitialized () |
initialize the plugin | |
void | slotObjectUpdated (int _identifier, const UpdateType &_type) |
void | slotObjectSelectionChanged (int _identifier) |
void | slotAllCleared () |
void | objectDeleted (int _identifier) |
void | noguiSupported () |
Private Slots inherited from BaseInterface | |
virtual void | exit () |
virtual QString | version () |
Return a version string for your plugin. More... | |
Private Slots inherited from InformationInterface |
Private Member Functions | |
void | slotInformationRequested (const QPoint _clickedPoint, DataType _type) |
Show information dialog on clicked object. More... | |
DataType | supportedDataTypes () |
Get data type for information requests. More... | |
void | slotShowHistogram () |
template<class MeshT > | |
void | printMeshInfo (MeshT *_mesh, int _id, unsigned int _face, ACG::Vec3d &_hitPoint) |
void | updateData (int _identifier, const UpdateType &_type, const bool deleted) |
Slot that updates the visualization. | |
Private Member Functions inherited from BaseInterface | |
virtual void | noguiSupported () |
virtual | ~BaseInterface () |
Destructor. | |
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... | |
Private Member Functions inherited from InformationInterface | |
virtual | ~InformationInterface () |
Default destructor. | |
Private Member Functions inherited from LoggingInterface | |
virtual | ~LoggingInterface () |
Destructor. | |
Private Member Functions inherited from StatusbarInterface | |
virtual | ~StatusbarInterface () |
Destructor. | |
void | setStatus (ApplicationStatus::applicationStatus _status) |
Sets the status icon of the StatusBar. More... | |
void | clearStatusMessage () |
Removes the current message from the statusBar. More... | |
void | addWidgetToStatusbar (QWidget *_widget) |
Add a widget on the right side of the statusBar. More... | |
Private Member Functions inherited from LoadSaveInterface | |
virtual | ~LoadSaveInterface () |
Destructor. | |
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... | |
Private Member Functions inherited from PythonInterface | |
virtual | ~PythonInterface () |
Destructor. | |
Private Attributes | |
InfoDialog * | info_ |
InfoBar * | infoBar_ |
BaseObjectData * | lastPickedObject_ |
int | lastPickedObjectId_ |
Scripting Functions | |
void | setDescriptions () |
set scripting slot descriptions More... | |
template<class MeshT > | |
int | getClosestVertexInFace (MeshT *_mesh, int _face_idx, ACG::Vec3d &_hitPoint) |
Get closest vertex index from a face. More... | |
template<class MeshT > | |
int | getClosestEdgeInFace (MeshT *_mesh, int _face_idx, const ACG::Vec3d &_hitPoint) |
Get closest edge index from a face. More... | |
template<class MeshT > | |
int | getClosestVertexFromEdge (MeshT *_mesh, int _edge_idx, ACG::Vec3d &_hitPoint) |
Get closest vertex index from an edge. More... | |
template<class MeshT > | |
void | getEdgeLengths (MeshT *_mesh, double &min, double &max, double &mean) |
Get edge lengths. | |
bool | getEdgeLengths (int _id, double &min, double &max, double &mean) |
Get edge lengths. | |
int | vertexCount (int _id) |
get total number of vertices for a given object More... | |
int | edgeCount (int _id) |
get total number of edges for a given object More... | |
int | faceCount (int _id) |
get total number of faces for a given object More... | |
int | boundaryCount (int _id) |
get the number of boundaries for a given object More... | |
int | componentCount (int _id) |
get the number of components for a given object More... | |
int | genus (int _id) |
get the genus of the given object More... | |
Vector | cog (int _id) |
get the center of gravity More... | |
Vector | boundingBoxMin (int _id) |
get minumum bounding box point More... | |
Vector | boundingBoxMax (int _id) |
get maximum bounding box point More... | |
Vector | boundingBoxSize (int _id) |
get the size of the bounding box More... | |
double | edgeLength (int _id, int _edgeHandle) |
get the length of an edge More... | |
double | faceArea (int _id, int _faceHandle) |
get the area of a face More... | |
double | aspectRatio (int _id, int _faceHandle) |
get the aspect ratio of a face More... | |
int | vertexValence (int _id, int _vertexHandle) |
get vertex valence More... | |
double | minEdgeLength (int _id) |
get the minimal edge length More... | |
double | maxEdgeLength (int _id) |
get the maximal edge length More... | |
double | meanEdgeLength (int _id) |
get the mean edge length More... | |
QString | version () |
set scripting slot descriptions More... | |
Plugin to visualize information about objects in the scene.
Plugin to visualize information about objects in the scene
Definition at line 78 of file MeshObjectInfoPlugin.hh.
|
slot |
get the aspect ratio of a face
_id | id of an object |
_faceHandle | face handle |
Definition at line 707 of file MeshObjectInfoScripting.cc.
|
slot |
get the number of boundaries for a given object
_id | object id |
Definition at line 248 of file MeshObjectInfoScripting.cc.
|
slot |
get maximum bounding box point
get maximum point of the (axis aligned) bounding box
_id | id of an object |
Definition at line 466 of file MeshObjectInfoScripting.cc.
|
slot |
get minumum bounding box point
get minimum point of the (axis aligned) bounding box
_id | id of an object |
Definition at line 416 of file MeshObjectInfoScripting.cc.
|
slot |
get the size of the bounding box
get the size of the (axis aligned) bounding box
_id | id of an object |
Definition at line 516 of file MeshObjectInfoScripting.cc.
|
slot |
get the center of gravity
_id | id of an object |
Definition at line 374 of file MeshObjectInfoScripting.cc.
|
slot |
get the number of components for a given object
_id | object id |
Definition at line 290 of file MeshObjectInfoScripting.cc.
|
slot |
get total number of edges for a given object
_id | object id |
Definition at line 164 of file MeshObjectInfoScripting.cc.
|
slot |
get the length of an edge
_id | id of an object |
_edgeHandle | edge handle |
Definition at line 567 of file MeshObjectInfoScripting.cc.
|
slot |
get the area of a face
_id | id of an object |
_faceHandle | face handle |
TODO implement polygonArea
Definition at line 632 of file MeshObjectInfoScripting.cc.
|
slot |
get total number of faces for a given object
_id | object id |
Definition at line 206 of file MeshObjectInfoScripting.cc.
|
slot |
get the genus of the given object
_id | id of an object |
TODO this formula only works for closed objects: fix it
Definition at line 332 of file MeshObjectInfoScripting.cc.
|
private |
Get closest edge index from a face.
Find closest edge to selection.
_mesh | Reference to the mesh |
_face_idx | Index of the face that has been clicked on |
_hitPoint | The point which will be tested |
Definition at line 649 of file MeshObjectInfoPlugin.cc.
|
private |
Get closest vertex index from an edge.
Find closest vertex on the edge (endpoint)
_mesh | Reference to the mesh |
_edge_idx | Index of the edge that has been clicked on |
_hitPoint | The point which will be tested |
Definition at line 696 of file MeshObjectInfoPlugin.cc.
|
private |
Get closest vertex index from a face.
Find closest vertex to selection.
_mesh | Reference to the mesh |
_face_idx | Index of the face that has been clicked on |
_hitPoint | The point that is used as the reference |
Definition at line 610 of file MeshObjectInfoPlugin.cc.
|
slot |
get the maximal edge length
get maximal edge length for a given object
_id | object id |
Definition at line 846 of file MeshObjectInfoScripting.cc.
|
slot |
get the mean edge length
get the mean edge length for a given object
_id | object id |
Definition at line 863 of file MeshObjectInfoScripting.cc.
|
slot |
get the minimal edge length
get minimal edge length for a given object
_id | object id |
Definition at line 829 of file MeshObjectInfoScripting.cc.
|
private |
set scripting slot descriptions
set the descriptions for scripting slots
Definition at line 54 of file MeshObjectInfoScripting.cc.
|
privatevirtual |
Show information dialog on clicked object.
This slot is called each time the user clicks on an object. The information plugin for a specific type should display the necessary information on all entity types and the clicked object itself.
_clickedPoint | The 2D point in screen coords, which the user has clicked |
_type | Data type to be registered |
Implements InformationInterface.
Definition at line 715 of file MeshObjectInfoPlugin.cc.
|
privatevirtual |
Get data type for information requests.
This slot is called by the core in order to identify the data types for which the plugin provides information.
Implements InformationInterface.
Definition at line 112 of file MeshObjectInfoPlugin.cc.
|
inlineslot |
set scripting slot descriptions
set the descriptions for scripting slots
Definition at line 193 of file MeshObjectInfoPlugin.hh.
|
slot |
get total number of vertices for a given object
_id | object id |
Definition at line 122 of file MeshObjectInfoScripting.cc.
|
slot |
get vertex valence
_id | id of an object |
_vertexHandle | vertex handle |
Definition at line 760 of file MeshObjectInfoScripting.cc.