57 #include <QFileDialog> 60 #include <OpenFlipper/common/OFGLWidget.hh> 63 #include <OpenFlipper/BasePlugin/PluginFunctionsViewControls.hh> 275 const QRegion& _region,
276 QList<QPair<size_t, size_t> >& _list,
277 QVector<float>* _depths = 0,
278 QVector<ACG::Vec3d>* _points = 0);
286 const QRegion& _region,
287 QList<QPair<size_t, size_t> >& _list,
288 QVector<float>* _depths = 0,
289 QVector<ACG::Vec3d>* _points = 0);
304 void pickMode (
const std::string& _mode);
472 operator value_handle() {
return pos_; };
484 pointer operator->();
511 inline void proceedToNextBaseObjectData(
BaseObject*& _object);
523 it_(_restriction, _dataType)
528 it_(_pos, _restriction, _dataType)
557 return it_ == _rhs.it_;
561 return it_ != _rhs.it_;
588 restriction_(_restriction),
602 IteratorRestriction restriction_;
618 restriction_(_restriction),
632 IteratorRestriction restriction_;
706 operator value_handle() {
return pos_; };
718 pointer operator->();
817 #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) 819 QWidget * parent =
nullptr,
const QString & caption = QString(),
820 const QString & defaultDir = QString(),
const QString & filter = QString(),
821 QString * selectedFilter =
nullptr, QFileDialog::Options options = 0);
824 QWidget * parent =
nullptr,
const QString & caption = QString(),
825 const QString & defaultDir = QString(),
const QString & filter = QString(),
826 QString * selectedFilter =
nullptr, QFileDialog::Options options = QFileDialog::Options() );
850 #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) 852 QWidget * parent =
nullptr,
const QString & caption = QString(),
853 const QString & defaultDir = QString(),
const QString & filter = QString(),
854 QString * selectedFilter =
nullptr, QFileDialog::Options options = 0,
855 const QString & defaultSuffix = QString() );
858 QWidget * parent =
nullptr,
const QString & caption = QString(),
859 const QString & defaultDir = QString(),
const QString & filter = QString(),
860 QString * selectedFilter =
nullptr, QFileDialog::Options options = QFileDialog::Options(),
861 const QString & defaultSuffix = QString() );
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 shareGLWidget(OFGLWidget *_widget)
Sets the main QGLWidget for gl data sharing.
BaseObjectData * value_handle
handle type (just an int)
void setDataRoot(BaseObject *_root)
int visibleCount()
Get the number of visible objects.
ACG::SceneGraph::BaseNode * getRootNode()
Get the root node for data objects.
ActionMode
Enum listing action modes of the viewers.
void getCurrentViewImage(QImage &_image)
Returns a QImage of the current View.
Range adapter for ObjectIterator.
int objectCount()
Get the number of available objects.
value_type & reference
reference type
bool getObject(const int _identifier, BaseObject *&_object)
Get the object which has the given identifier.
BaseObject *& objectRoot()
Get the root of the object structure.
value_type * pointer
basic pointer type
int getObjectId(const QString &_name)
ACG::SceneGraph::BaseNode * getSceneGraphRootNode()
get scenegraph root node
bool scenegraphRegionPick(ACG::SceneGraph::PickTarget _pickTarget, const QRegion &_region, QList< QPair< size_t, size_t > > &_list, QVector< float > *_depths, QVector< ACG::Vec3d > *_points)
QStringList collectObjectComments(bool visibleOnly, bool targetedOnly)
const QStringList SOURCE_OBJECTS("source")
Iterable object range.
void setEncodedExaminerView(QString _view)
Set the encoded view for the active examiner.
const QStringList ALL_OBJECTS
Iterable object range.
Helper class that wraps an ObjectIterator to return a reference instead of a pointer.
QStringList collectObjectMaterials(bool visibleOnly, bool targetedOnly)
unsigned int activeExaminer()
Get the id of the examiner which got the last mouse events.
BaseObjectData * baseObjectData(BaseObject *_object)
Cast an BaseObject to a BaseObjectData if possible.
bool getAllMeshes(std::vector< int > &_identifiers)
Get identifiers of all meshes.
BaseObject * value_handle
handle type (just an int)
BaseObjectData * pos_
current position of the iterator
void setDefaultViewObjectMarker(ViewObjectMarker *_marker)
DLLEXPORT ObjectIterator objectsEnd()
Return Iterator to Object End.
PickTarget
What target to use for picking.
value_type * pointer
basic pointer type
QString getOpenFileName(const QString &configProperty, QWidget *parent, const QString &caption, const QString &defaultDir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
IteratorRestriction restriction_
Restriction of the iterator.
int viewers()
Get the number of viewers.
Viewer::ActionMode actionMode()
Get the current Action mode.
void setViewObjectMarker(ViewObjectMarker *_marker)
bool objectExists(const int _identifier)
Check if an object with this identifier exists.
int viewerId()
Return unique viewer id.
QPoint mapToLocal(const QPoint _point)
Map global coordinates to GL Widget local coordinates.
Core Data Iterator used to iterate over all objects (Including groups)
int targetCount()
Get the number of target objects.
IteratorRestriction restriction_
Restriction of the iterator.
QStringList IteratorRestriction
Iterable object range.
void traverse(ACG::SceneGraph::MouseEventAction &_action)
const std::string pickMode()
Get the current Picking mode.
BaseObjectData value_type
type of the Objects the iterator works on
const QStringList TARGET_OBJECTS("target")
Iterable object range.
void disableExaminerLightHandling()
Disable the core light handling.
ObjectRange objects(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.
bool getSourceIdentifiers(std::vector< int > &_identifiers)
Get the identifiers of all objects marked as a source object.
void addObjectRenderingNode(ACG::SceneGraph::BaseNode *_node)
Add scenegraph node modifing object rendering.
ObjectReferenceRange objectReferences(IteratorRestriction _restriction, DataType _dataType)
Iterable object range.
QPoint mapToGlobal(const QPoint _point)
Map coordinates of GL Widget to global coordinates.
DataType dataType_
returned data types of the iterator
void addGlobalNode(ACG::SceneGraph::BaseNode *_node)
Add a global node.
ViewObjectMarker * defaultViewObjectMarker()
Get the default ViewObjectMarker.
BaseObject * pos_
current position of the iterator
void allowRotation(bool _mode, int _viewer)
QString getSaveFileName(const QString &configProperty, QWidget *parent, const QString &caption, const QString &defaultDir, const QString &filter, QString *selectedFilter, QFileDialog::Options options, const QString &defaultSuffix)
bool examinerLightHandling()
returns if internal light handling is active.
Range adapter for ObjectIterator.
DLLEXPORT BaseObjectIterator baseObjectsEnd()
Return Iterator to Object End.
value_type & reference
reference type
int sourceCount()
Get the number of source objects.
bool getAllObjectIdentifiers(std::vector< int > &_identifiers)
Get identifiers of all objects.
QString getEncodedExaminerView()
Get the encoded view for the active examiner.
bool getPickedObject(const size_t _node_idx, BaseObjectData *&_object)
Get the picked mesh.
bool getTargetIdentifiers(std::vector< int > &_identifiers)
Get the identifiers of all objects marked as a target object.
void addGlobalStatusNode(ACG::SceneGraph::BaseNode *_node)
Adds a global status node.
BaseObject value_type
type of the Objects the iterator works on
DataType dataType_
returned data types of the iterator
const DataType DATA_ALL(UINT_MAX)
Identifier for all available objects.
void setSceneCenter(const ACG::Vec3d &_center, int _viewer)