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