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);
304void pickMode (
const std::string& _mode);
524 inline void proceedToNextBaseObjectData(
BaseObject*& _object);
535 using iterator_category = std::forward_iterator_tag;
537 using difference_type = std::ptrdiff_t;
542 it_(_restriction, _dataType)
547 it_(_pos, _restriction, _dataType)
576 return it_ == _rhs.it_;
580 return it_ != _rhs.it_;
607 restriction_(_restriction),
637 restriction_(_restriction),
737 pointer operator->();
836#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
838 QWidget * parent =
nullptr,
const QString & caption = QString(),
839 const QString & defaultDir = QString(),
const QString & filter = QString(),
840 QString * selectedFilter =
nullptr, QFileDialog::Options options = 0);
843 QWidget * parent =
nullptr,
const QString & caption = QString(),
844 const QString & defaultDir = QString(),
const QString & filter = QString(),
845 QString * selectedFilter =
nullptr, QFileDialog::Options options = QFileDialog::Options() );
869#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
871 QWidget * parent =
nullptr,
const QString & caption = QString(),
872 const QString & defaultDir = QString(),
const QString & filter = QString(),
873 QString * selectedFilter =
nullptr, QFileDialog::Options options = 0,
874 const QString & defaultSuffix = QString() );
877 QWidget * parent =
nullptr,
const QString & caption = QString(),
878 const QString & defaultDir = QString(),
const QString & filter = QString(),
879 QString * selectedFilter =
nullptr, QFileDialog::Options options = QFileDialog::Options(),
880 const QString & defaultSuffix = QString() );
const DataType DATA_ALL(UINT_MAX)
Identifier for all available objects.
ActionMode
Enum listing action modes of the viewers.
Core Data Iterator used to iterate over all objects (Including groups)
BaseObject * pos_
current position of the iterator
IteratorRestriction restriction_
Restriction of the iterator.
value_type * pointer
basic pointer type
BaseObject * index()
return current position of the iterator
value_type & reference
reference type
DataType dataType_
returned data types of the iterator
BaseObject * value_handle
handle type (just an int)
BaseObject value_type
type of the Objects the iterator works on
value_type & reference
reference type
BaseObjectData * index()
return current position of the iterator
BaseObjectData * value_handle
handle type (just an int)
BaseObjectData value_type
type of the Objects the iterator works on
BaseObjectData * pos_
current position of the iterator
value_type * pointer
basic pointer type
ObjectIterator & operator=(const ObjectIterator &)=default
assign iterators
DataType dataType_
returned data types of the iterator
IteratorRestriction restriction_
Restriction of the iterator.
Range adapter for ObjectIterator.
Helper class that wraps an ObjectIterator to return a reference instead of a pointer.
Range adapter for ObjectIterator.
PickTarget
What target to use for picking.
DLLEXPORT BaseObjectIterator baseObjectsEnd()
Return Iterator to Object End.
void getCurrentViewImage(QImage &_image)
Returns a QImage of the current View.
int targetCount()
Get the number of target objects.
void addObjectRenderingNode(ACG::SceneGraph::BaseNode *_node)
Add scenegraph node modifing object rendering.
void addGlobalNode(ACG::SceneGraph::BaseNode *_node)
Add a global node.
DLLEXPORT ObjectIterator objectsEnd()
Return Iterator to Object End.
int viewerId()
Return unique viewer id.
void shareGLWidget(OFGLWidget *_widget)
Sets the main QGLWidget for gl data sharing.
int getObjectId(const QString &_name)
bool scenegraphRegionPick(ACG::SceneGraph::PickTarget _pickTarget, const QRegion &_region, QList< QPair< size_t, size_t > > &_list, QVector< float > *_depths, QVector< ACG::Vec3d > *_points)
QStringList collectObjectMaterials(bool visibleOnly, bool targetedOnly)
QPoint adjustForDevicePixelRatio(const QPoint &point)
int sourceCount()
Get the number of source objects.
bool getObject(const int _identifier, BaseObject *&_object)
Get the object which has the given identifier.
ACG::SceneGraph::BaseNode * getRootNode()
Get the root node for data objects.
QPoint mapToGlobal(const QPoint _point)
Map coordinates of GL Widget to global coordinates.
void setDataRoot(BaseObject *_root)
ObjectReferenceRange objectReferences(IteratorRestriction _restriction, DataType _dataType)
Iterable object range.
int objectCount()
Get the number of available objects.
QString getOpenFileName(const QString &configProperty, QWidget *parent, const QString &caption, const QString &defaultDir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
const std::string pickMode()
Get the current Picking mode.
QStringList collectObjectComments(bool visibleOnly, bool targetedOnly)
QPoint mapToLocal(const QPoint _point)
Map global coordinates to GL Widget local coordinates.
QString getEncodedExaminerView()
Get the encoded view for the active examiner.
void setSceneCenter(const ACG::Vec3d &_center, int _viewer)
int viewers()
Get the number of viewers.
bool getAllObjectIdentifiers(std::vector< int > &_identifiers)
Get identifiers of all objects.
bool getPickedObject(const size_t _node_idx, BaseObjectData *&_object)
Get the picked mesh.
BaseObject *& objectRoot()
Get the root of the object structure.
ViewObjectMarker * defaultViewObjectMarker()
Get the default ViewObjectMarker.
bool objectExists(const int _identifier)
Check if an object with this identifier exists.
bool examinerLightHandling()
returns if internal light handling is active.
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 getSourceIdentifiers(std::vector< int > &_identifiers)
Get the identifiers of all objects marked as a source object.
void traverse(ACG::SceneGraph::MouseEventAction &_action)
const QStringList SOURCE_OBJECTS("source")
Iterable object range.
QStringList IteratorRestriction
Iterable object range.
int visibleCount()
Get the number of visible 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.
Viewer::ActionMode actionMode()
Get the current Action mode.
void setEncodedExaminerView(const QString &_view)
Set the encoded view for the active examiner.
void allowRotation(bool _mode, int _viewer)
void setActiveExaminer(const unsigned int _id)
Set the active id of the examiner which got the last mouse events.
bool getTargetIdentifiers(std::vector< int > &_identifiers)
Get the identifiers of all objects marked as a target object.
void disableExaminerLightHandling()
Disable the core light handling.
bool getAllMeshes(std::vector< int > &_identifiers)
Get identifiers of all meshes.
unsigned int activeExaminer()
Get the id of the examiner which got the last mouse events.
void addGlobalStatusNode(ACG::SceneGraph::BaseNode *_node)
Adds a global status node.
ACG::SceneGraph::BaseNode * getSceneGraphRootNode()
get scenegraph root node
const QStringList TARGET_OBJECTS("target")
Iterable object range.
void setDefaultViewObjectMarker(ViewObjectMarker *_marker)
ObjectRange objects(IteratorRestriction _restriction, DataType _dataType)
Iterable object range.
void setViewObjectMarker(ViewObjectMarker *_marker)
const QStringList ALL_OBJECTS
Iterable object range.
BaseObjectData * baseObjectData(BaseObject *_object)
Cast an BaseObject to a BaseObjectData if possible.