Developer Documentation
PluginFunctions.hh File Reference
#include <QPair>
#include <QFileDialog>
#include <OpenFlipper/common/Types.hh>
#include <OpenFlipper/common/OFGLWidget.hh>
#include <ACG/Scenegraph/SceneGraph.hh>
#include <OpenFlipper/BasePlugin/PluginFunctionsViewControls.hh>

Go to the source code of this file.

Classes

class  PluginFunctions::ObjectIterator
 Core Data Iterator. More...
 
class  PluginFunctions::ObjectReferenceIterator
 Helper class that wraps an ObjectIterator to return a reference instead of a pointer. More...
 
class  PluginFunctions::ObjectRange
 Range adapter for ObjectIterator. More...
 
class  PluginFunctions::ObjectReferenceRange
 Range adapter for ObjectIterator. More...
 
class  PluginFunctions::BaseObjectIterator
 Core Data Iterator used to iterate over all objects (Including groups) More...
 

Namespaces

 PluginFunctions
 

Functions

int PluginFunctions::viewerId ()
 Return unique viewer id. More...
 
BaseObject *& PluginFunctions::objectRoot ()
 Get the root of the object structure.
 
QString PluginFunctions::getOpenFileName (const QString &configProperty, QWidget *parent, const QString &caption, const QString &defaultDir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
 
QString PluginFunctions::getSaveFileName (const QString &configProperty, QWidget *parent, const QString &caption, const QString &defaultDir, const QString &filter, QString *selectedFilter, QFileDialog::Options options, const QString &defaultSuffix)
 
Active Objects
bool PluginFunctions::getPickedObject (const size_t _node_idx, BaseObjectData *&_object)
 Get the picked mesh. More...
 
Identifier handling
bool PluginFunctions::getSourceIdentifiers (std::vector< int > &_identifiers)
 Get the identifiers of all objects marked as a source object. More...
 
bool PluginFunctions::getTargetIdentifiers (std::vector< int > &_identifiers)
 Get the identifiers of all objects marked as a target object. More...
 
bool PluginFunctions::getAllObjectIdentifiers (std::vector< int > &_identifiers)
 Get identifiers of all objects. More...
 
bool PluginFunctions::getAllMeshes (std::vector< int > &_identifiers)
 Get identifiers of all meshes. More...
 
bool PluginFunctions::getObject (const int _identifier, BaseObject *&_object)
 Get the object which has the given identifier. More...
 
bool PluginFunctions::getObject (const int _identifier, BaseObjectData *&_object)
 
int PluginFunctions::getObjectId (const QString &_name)
 
bool PluginFunctions::objectExists (const int _identifier)
 Check if an object with this identifier exists. More...
 
int PluginFunctions::objectCount ()
 Get the number of available objects.
 
int PluginFunctions::targetCount ()
 Get the number of target objects.
 
int PluginFunctions::sourceCount ()
 Get the number of source objects.
 
int PluginFunctions::visibleCount ()
 Get the number of visible objects.
 
Examiner handling
int PluginFunctions::viewers ()
 Get the number of viewers.
 
void PluginFunctions::disableExaminerLightHandling ()
 Disable the core light handling. More...
 
bool PluginFunctions::examinerLightHandling ()
 returns if internal light handling is active. More...
 
void PluginFunctions::setActiveExaminer (const unsigned int _id)
 Set the active id of the examiner which got the last mouse events.
 
unsigned int PluginFunctions::activeExaminer ()
 Get the id of the examiner which got the last mouse events.
 
QString PluginFunctions::getEncodedExaminerView ()
 Get the encoded view for the active examiner.
 
QString PluginFunctions::getEncodedExaminerView (int _viewerId)
 Get the encoded view for the given.
 
void PluginFunctions::setEncodedExaminerView (QString _view)
 Set the encoded view for the active examiner.
 
void PluginFunctions::setEncodedExaminerView (int _viewerId, QString _view)
 Set the encoded view for the given.
 
void PluginFunctions::setSceneCenter (const ACG::Vec3d &_center, int _viewer)
 
bool PluginFunctions::scenegraphPick (ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, size_t &_nodeIdx, size_t &_targetIdx, ACG::Vec3d *_hitPointPtr)
 Execute picking operation on scenegraph. More...
 
bool PluginFunctions::scenegraphPick (const unsigned int _examiner,ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, size_t &_nodeIdx, size_t &_targetIdx, ACG::Vec3d *_hitPointPtr)
 Execute picking operation on scenegraph. More...
 
bool PluginFunctions::scenegraphPick (const unsigned int _examiner,ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, BaseObjectData *&_object, size_t &_targetIdx, const bool _refine,ACG::Vec3d *_hitPointPtr)
 Execute picking operation on scenegraph and return object. More...
 
bool PluginFunctions::scenegraphPick (ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, BaseObjectData *&_object, size_t &_targetIdx, const bool _refine, ACG::Vec3d *_hitPointPtr)
 Execute picking operation on scenegraph and return object. More...
 
bool PluginFunctions::scenegraphRegionPick (ACG::SceneGraph::PickTarget _pickTarget, const QRegion &_region, QList< QPair< size_t, size_t > > &_list, QVector< float > *_depths, QVector< ACG::Vec3d > *_points)
 
bool PluginFunctions::scenegraphRegionPick (const unsigned int _examiner, ACG::SceneGraph::PickTarget _pickTarget, const QRegion &_region, QList< QPair< size_t, size_t > > &_list, QVector< float > *_depths, QVector< ACG::Vec3d > *_points)
 
void PluginFunctions::traverse (ACG::SceneGraph::MouseEventAction &_action)
 
const std::string PluginFunctions::pickMode ()
 Get the current Picking mode.
 
void PluginFunctions::pickMode (const std::string &_mode)
 Set the current Picking mode for all examiner widgets.
 
void PluginFunctions::getCurrentViewImage (QImage &_image)
 Returns a QImage of the current View.
 
ACG::SceneGraph::BaseNodePluginFunctions::getSceneGraphRootNode ()
 get scenegraph root node More...
 
ACG::SceneGraph::BaseNodePluginFunctions::getRootNode ()
 Get the root node for data objects. More...
 
void PluginFunctions::addGlobalNode (ACG::SceneGraph::BaseNode *_node)
 Add a global node. More...
 
void PluginFunctions::addGlobalStatusNode (ACG::SceneGraph::BaseNode *_node)
 Adds a global status node. More...
 
void PluginFunctions::addObjectRenderingNode (ACG::SceneGraph::BaseNode *_node)
 Add scenegraph node modifing object rendering. More...
 
void PluginFunctions::actionMode (Viewer::ActionMode _mode)
 Set the current Action Mode (PickMode,ExamineMode,...)
 
Viewer::ActionMode PluginFunctions::actionMode ()
 Get the current Action mode.
 
void PluginFunctions::shareGLWidget (OFGLWidget *_widget)
 Sets the main QGLWidget for gl data sharing.
 
OFGLWidget * PluginFunctions::shareGLWidget ()
 Returns the main QGLWidget for gl data sharing.
 
DLLEXPORT void PluginFunctions::allowRotation (bool _mode)
 
QPoint PluginFunctions::mapToGlobal (const QPoint _point)
 Map coordinates of GL Widget to global coordinates. More...
 
QPoint PluginFunctions::mapToLocal (const QPoint _point)
 Map global coordinates to GL Widget local coordinates. More...
 
void PluginFunctions::setViewObjectMarker (ViewObjectMarker *_marker)
 
void PluginFunctions::setDefaultViewObjectMarker (ViewObjectMarker *_marker)
 
QStringList PluginFunctions::collectObjectComments (bool visibleOnly, bool targetedOnly)
 
QStringList PluginFunctions::collectObjectMaterials (bool visibleOnly, bool targetedOnly)
 
ViewObjectMarkerPluginFunctions::defaultViewObjectMarker ()
 Get the default ViewObjectMarker.
 
Do never use!!
void PluginFunctions::setDataRoot (BaseObject *_root)
 
Getting data from objects and casting between them
BaseObjectDataPluginFunctions::baseObjectData (BaseObject *_object)
 Cast an BaseObject to a BaseObjectData if possible. More...
 

Iterators

typedef QStringList PluginFunctions::IteratorRestriction
 Iterable object range. More...
 
const QStringList PluginFunctions::ALL_OBJECTS
 Iterable object range. More...
 
const QStringList PluginFunctions::TARGET_OBJECTS ("target")
 Iterable object range. More...
 
const QStringList PluginFunctions::SOURCE_OBJECTS ("source")
 Iterable object range. More...
 
ObjectReferenceRange PluginFunctions::objectReferences (IteratorRestriction _restriction=ALL_OBJECTS, DataType _dataType=DATA_ALL)
 Iterable object range. More...
 
ObjectRange PluginFunctions::objects (IteratorRestriction _restriction=ALL_OBJECTS, DataType _dataType=DATA_ALL)
 Iterable object range. More...
 
DLLEXPORT ObjectIterator PluginFunctions::objectsEnd ()
 Return Iterator to Object End.
 
DLLEXPORT BaseObjectIterator PluginFunctions::baseObjectsEnd ()
 Return Iterator to Object End.
 

Detailed Description

This file contains functions which can be used by plugins to access data in the framework.

This file contains functions to setup the internal structures for PluginFunctions. Dont Use these Functions in your Plugins!

Definition in file PluginFunctions.hh.