65 #ifndef PLUGINFUNCTIONS_HH
66 #define PLUGINFUNCTIONS_HH
71 #include <QFileDialog>
74 #include <OpenFlipper/BasePlugin/PluginFunctionsViewControls.hh>
287 const QRegion& _region,
288 QList<QPair<size_t, size_t> >& _list,
289 QVector<float>* _depths = 0,
290 QVector<ACG::Vec3d>* _points = 0);
298 const QRegion& _region,
299 QList<QPair<size_t, size_t> >& _list,
300 QVector<float>* _depths = 0,
301 QVector<ACG::Vec3d>* _points = 0);
316 void pickMode (
const std::string& _mode);
481 operator value_handle() {
return pos_; };
493 pointer operator->();
520 inline void proceedToNextBaseObjectData(
BaseObject*& _object);
532 it_(_restriction, _dataType)
537 it_(_pos, _restriction, _dataType)
566 return it_ == _rhs.it_;
570 return it_ != _rhs.it_;
597 restriction_(_restriction),
611 IteratorRestriction restriction_;
627 restriction_(_restriction),
641 IteratorRestriction restriction_;
715 operator value_handle() {
return pos_; };
727 pointer operator->();
827 QWidget * parent = 0,
const QString & caption = QString(),
828 const QString & defaultDir = QString(),
const QString & filter = QString(),
829 QString * selectedFilter = 0, QFileDialog::Options options = 0);
851 QWidget * parent = 0,
const QString & caption = QString(),
852 const QString & defaultDir = QString(),
const QString & filter = QString(),
853 QString * selectedFilter = 0, QFileDialog::Options options = 0,
854 const QString & defaultSuffix = QString() );
858 #endif //PLUGINFUNCTIONS_HH
Range adapter for ObjectIterator.
QStringList collectObjectComments(bool visibleOnly, bool targetedOnly)
ObjectReferenceRange objectReferences(IteratorRestriction _restriction, DataType _dataType)
Iterable object range.
void setActiveExaminer(const unsigned int _id)
Set the active id of the examiner which got the last mouse events.
QPoint mapToGlobal(const QPoint _point)
Map coordinates of GL Widget to global coordinates.
value_type & reference
reference type
void allowRotation(bool _mode, int _viewer)
void setDataRoot(BaseObject *_root)
void setViewObjectMarker(ViewObjectMarker *_marker)
value_type & reference
reference type
DLLEXPORT BaseObjectIterator baseObjectsEnd()
Return Iterator to Object End.
void addGlobalStatusNode(ACG::SceneGraph::BaseNode *_node)
Adds a global status node.
bool getSourceIdentifiers(std::vector< int > &_identifiers)
Get the identifiers of all objects marked as a source object.
IteratorRestriction restriction_
Restriction of the iterator.
bool getObject(int _identifier, BSplineCurveObject *&_object)
int sourceCount()
Get the number of source objects.
QString getOpenFileName(const QString &configProperty, QWidget *parent, const QString &caption, const QString &defaultDir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
Core Data Iterator used to iterate over all objects (Including groups)
Helper class that wraps an ObjectIterator to return a reference instead of a pointer.
int getObjectId(const QString &_name)
QString getEncodedExaminerView()
Get the encoded view for the active examiner.
QPoint mapToLocal(const QPoint _point)
Map global coordinates to GL Widget local coordinates.
BaseObject * value_handle
handle type (just an int)
ViewObjectMarker * defaultViewObjectMarker()
Get the default ViewObjectMarker.
value_type * pointer
basic pointer type
DataType dataType_
returned data types of the iterator
const DataType DATA_ALL(UINT_MAX)
Identifier for all available objects.
unsigned int activeExaminer()
Get the id of the examiner which got the last mouse events.
void addObjectRenderingNode(ACG::SceneGraph::BaseNode *_node)
Add scenegraph node modifing object rendering.
Viewer::ActionMode actionMode()
Get the current Action mode.
ACG::SceneGraph::BaseNode * getRootNode()
Get the root node for data objects.
bool scenegraphPick(ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, size_t &_nodeIdx, size_t &_targetIdx, ACG::Vec3d *_hitPointPtr=0)
Execute picking operation on scenegraph.
void setDefaultViewObjectMarker(ViewObjectMarker *_marker)
const QStringList SOURCE_OBJECTS("source")
Iterable object range.
void setSceneCenter(const ACG::Vec3d &_center, int _viewer)
bool objectExists(const int _identifier)
Check if an object with this identifier exists.
int viewers()
Get the number of viewers.
BaseObjectData * baseObjectData(BaseObject *_object)
Cast an BaseObject to a BaseObjectData if possible.
void shareGLWidget(QGLWidget *_widget)
Sets the main QGLWidget for gl data sharing.
const QStringList ALL_OBJECTS
Iterable object range.
BaseObjectData value_type
type of the Objects the iterator works on
Range adapter for ObjectIterator.
BaseObjectData * value_handle
handle type (just an int)
int visibleCount()
Get the number of visible objects.
QString getSaveFileName(const QString &configProperty, QWidget *parent, const QString &caption, const QString &defaultDir, const QString &filter, QString *selectedFilter, QFileDialog::Options options, const QString &defaultSuffix)
ObjectRange objects(IteratorRestriction _restriction, DataType _dataType)
Iterable object range.
value_type * pointer
basic pointer type
DLLEXPORT ObjectIterator objectsEnd()
Return Iterator to Object End.
int objectCount()
Get the number of available objects.
int viewerId()
Return unique viewer id.
void setEncodedExaminerView(QString _view)
Set the encoded view for the active examiner.
PickTarget
What target to use for picking.
DataType dataType_
returned data types of the iterator
void disableExaminerLightHandling()
Disable the core light handling.
QStringList collectObjectMaterials(bool visibleOnly, bool targetedOnly)
BaseObject value_type
type of the Objects the iterator works on
bool getAllMeshes(std::vector< int > &_identifiers)
Get identifiers of all meshes.
QStringList IteratorRestriction
Iterable object range.
const std::string pickMode()
Get the current Picking mode.
const QStringList TARGET_OBJECTS("target")
Iterable object range.
BaseObject *& objectRoot()
Get the root of the object structure.
void traverse(ACG::SceneGraph::MouseEventAction &_action)
bool examinerLightHandling()
returns if internal light handling is active.
void addGlobalNode(ACG::SceneGraph::BaseNode *_node)
Add a global node.
IteratorRestriction restriction_
Restriction of the iterator.
bool getPickedObject(const size_t _node_idx, BaseObjectData *&_object)
Get the picked mesh.
ACG::SceneGraph::BaseNode * getSceneGraphRootNode()
get scenegraph root node
void getCurrentViewImage(QImage &_image)
Returns a QImage of the current View.
bool scenegraphRegionPick(ACG::SceneGraph::PickTarget _pickTarget, const QRegion &_region, QList< QPair< size_t, size_t > > &_list, QVector< float > *_depths, QVector< ACG::Vec3d > *_points)
bool getTargetIdentifiers(std::vector< int > &_identifiers)
Get the identifiers of all objects marked as a target object.
bool getAllObjectIdentifiers(std::vector< int > &_identifiers)
Get identifiers of all objects.
int targetCount()
Get the number of target objects.