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