Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
PluginFunctions.hh
Go to the documentation of this file.
1 /*===========================================================================*\
2 * *
3 * OpenFlipper *
4 * Copyright (c) 2001-2015, RWTH-Aachen University *
5 * Department of Computer Graphics and Multimedia *
6 * All rights reserved. *
7 * www.openflipper.org *
8 * *
9 *---------------------------------------------------------------------------*
10 * This file is part of OpenFlipper. *
11 *---------------------------------------------------------------------------*
12 * *
13 * Redistribution and use in source and binary forms, with or without *
14 * modification, are permitted provided that the following conditions *
15 * are met: *
16 * *
17 * 1. Redistributions of source code must retain the above copyright notice, *
18 * this list of conditions and the following disclaimer. *
19 * *
20 * 2. Redistributions in binary form must reproduce the above copyright *
21 * notice, this list of conditions and the following disclaimer in the *
22 * documentation and/or other materials provided with the distribution. *
23 * *
24 * 3. Neither the name of the copyright holder nor the names of its *
25 * contributors may be used to endorse or promote products derived from *
26 * this software without specific prior written permission. *
27 * *
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
29 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
30 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
31 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
32 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
33 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
34 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
35 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
36 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
37 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
38 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
39 * *
40 \*===========================================================================*/
41
42 /*===========================================================================*\
43 * *
44 * $Revision$ *
45 * $LastChangedBy$ *
46 * $Date$ *
47 * *
48 \*===========================================================================*/
49
50
51
52
53 //=============================================================================
54 //
55 // Standard Functions
56 //
57 //=============================================================================
58
64 //
65 #ifndef PLUGINFUNCTIONS_HH
66 #define PLUGINFUNCTIONS_HH
67
68 #include <OpenFlipper/common/Types.hh>
69
70 #include <QPair>
71 #include <QFileDialog>
72
73 #include <ACG/Scenegraph/SceneGraph.hh>
74 #include <OpenFlipper/BasePlugin/PluginFunctionsViewControls.hh>
75
76 //== FORWARDDECLARATIONS ======================================================
77 class ViewObjectMarker;
78 class QGLWidget;
79
82 namespace PluginFunctions {
83
84 //=======================================
85 // Get Source/Target objects
88 //=======================================
89
95 DLLEXPORT
96 bool getPickedObject(const unsigned int _node_idx , BaseObjectData*& _object);
97
100 //=======================================
101 // Get Objects by their identifier
104 //=======================================
105
111 DLLEXPORT
112 bool getSourceIdentifiers( std::vector<int>& _identifiers );
113
119 DLLEXPORT
120 bool getTargetIdentifiers( std::vector<int>& _identifiers );
121
127 DLLEXPORT
128 bool getAllObjectIdentifiers( std::vector<int>& _identifiers );
129
135 DLLEXPORT
136 bool getAllMeshes( std::vector<int>& _identifiers );
137
148 DLLEXPORT
149 bool getObject( const int _identifier , BaseObject*& _object );
150
154 DLLEXPORT
155 bool getObject( const int _identifier , BaseObjectData*& _object );
156
159 DLLEXPORT
160 int getObjectId( const QString& _name );
161
167 DLLEXPORT
168 bool objectExists( const int _identifier );
169
171 DLLEXPORT
172 int objectCount();
173
175 DLLEXPORT
176 int targetCount();
177
179 DLLEXPORT
180 int sourceCount();
181
183 DLLEXPORT
184 int visibleCount();
185
188 //=======================================
189 // Get/set status of examiner
192 //=======================================
193
194
196 DLLEXPORT
197 int viewers( );
198
206 DLLEXPORT
207 void disableExaminerLightHandling();
208
214 DLLEXPORT
215 bool examinerLightHandling();
216
218 DLLEXPORT
219 void setActiveExaminer( const unsigned int _id );
220
222 DLLEXPORT
223 unsigned int activeExaminer();
224
226 DLLEXPORT
227 QString getEncodedExaminerView();
228
230 DLLEXPORT
231 QString getEncodedExaminerView(int _viewerId);
232
234 DLLEXPORT
235 void setEncodedExaminerView( QString _view );
236
238 DLLEXPORT
239 void setEncodedExaminerView(int _viewerId , QString _view );
240
244 DLLEXPORT
245 void setSceneCenter(const ACG::Vec3d& _center, int _viewer );
246
252 DLLEXPORT
253 bool scenegraphPick( ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, unsigned int &_nodeIdx, unsigned int &_targetIdx, ACG::Vec3d *_hitPointPtr );
254
259 DLLEXPORT
260 bool scenegraphPick( const unsigned int _examiner ,ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, unsigned int &_nodeIdx, unsigned int &_targetIdx, ACG::Vec3d *_hitPointPtr );
261
268 DLLEXPORT
269 bool scenegraphPick( const unsigned int _examiner ,ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, BaseObjectData*& _object, unsigned int &_targetIdx, const bool _refine ,ACG::Vec3d *_hitPointPtr );
270
277 DLLEXPORT
278 bool scenegraphPick( ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, BaseObjectData*& _object, unsigned int &_targetIdx, const bool _refine, ACG::Vec3d *_hitPointPtr );
279
280
285 DLLEXPORT
286 bool scenegraphRegionPick( ACG::SceneGraph::PickTarget _pickTarget,
287 const QRegion& _region,
288 QList<QPair<unsigned int, unsigned int> >& _list,
289 QVector<float>* _depths = 0,
290 QVector<ACG::Vec3d>* _points = 0);
291
295 DLLEXPORT
296 bool scenegraphRegionPick( const unsigned int _examiner,
297 ACG::SceneGraph::PickTarget _pickTarget,
298 const QRegion& _region,
299 QList<QPair<unsigned int, unsigned int> >& _list,
300 QVector<float>* _depths = 0,
301 QVector<ACG::Vec3d>* _points = 0);
302
307 DLLEXPORT
308 void traverse( ACG::SceneGraph::MouseEventAction &_action );
309
311 DLLEXPORT
312 const std::string pickMode ();
313
315 DLLEXPORT
316 void pickMode ( const std::string& _mode);
317
319 DLLEXPORT
320 void getCurrentViewImage(QImage& _image);
321
330 DLLEXPORT
331 ACG::SceneGraph::BaseNode* getSceneGraphRootNode();
332
338 DLLEXPORT
339 ACG::SceneGraph::BaseNode* getRootNode();
340
346 DLLEXPORT
347 void addGlobalNode(ACG::SceneGraph::BaseNode* _node);
348
354 void addGlobalStatusNode(ACG::SceneGraph::BaseNode* _node);
355
364 DLLEXPORT
365 void addObjectRenderingNode(ACG::SceneGraph::BaseNode* _node);
366
368 DLLEXPORT
369 void actionMode ( Viewer::ActionMode _mode);
370
372 DLLEXPORT
373 Viewer::ActionMode actionMode();
374
376 DLLEXPORT
377 void shareGLWidget (QGLWidget* _widget);
378
380 DLLEXPORT
381 QGLWidget* shareGLWidget ();
382
387 DLLEXPORT
388 void allowRotation(bool _mode);
389
393 DLLEXPORT
394 QPoint mapToGlobal( const QPoint _point );
395
399 DLLEXPORT
400 QPoint mapToLocal( const QPoint _point );
401
406 DLLEXPORT
407 void setViewObjectMarker (ViewObjectMarker *_marker);
408
413 DLLEXPORT
414 void setDefaultViewObjectMarker (ViewObjectMarker *_marker);
415
418 DLLEXPORT
419 QStringList collectObjectComments(bool visibleOnly, bool targetedOnly);
420
423 DLLEXPORT
424 QStringList collectObjectMaterials(bool visibleOnly, bool targetedOnly);
425
427 DLLEXPORT
428 ViewObjectMarker* defaultViewObjectMarker ();
429
433 //=======================================
434 // Iterators for object Access
437 //=======================================
438
439 typedef QStringList IteratorRestriction;
440
441 const QStringList ALL_OBJECTS;
442 const QStringList TARGET_OBJECTS ("target");
443 const QStringList SOURCE_OBJECTS ("source");
444
452 class DLLEXPORT ObjectIterator {
453
454 public :
455
457 typedef BaseObjectData value_type;
458
460 typedef BaseObjectData* value_handle;
461
463 typedef value_type& reference;
464
466 typedef value_type* pointer;
467
475 ObjectIterator(IteratorRestriction _restriction = ALL_OBJECTS , DataType _dataType = DATA_ALL );
476
478 ObjectIterator(BaseObjectData* pos, IteratorRestriction _restriction = ALL_OBJECTS , DataType _dataType = DATA_ALL );
479
481 operator value_handle() { return pos_; };
482
484 bool operator==( const ObjectIterator& _rhs) const;
485
487 bool operator!=( const ObjectIterator& _rhs) const;
488
490 ObjectIterator& operator=( const ObjectIterator& _rhs);
491
493 pointer operator->();
494
496 ObjectIterator& operator++();
497
499 ObjectIterator& operator--();
500
502 BaseObjectData* operator*();
503
505 BaseObjectData* index() { return pos_; };
506
507 private :
509 BaseObjectData* pos_;
510
512 DataType dataType_;
513
515 IteratorRestriction restriction_;
516
520 inline void proceedToNextBaseObjectData(BaseObject*& _object);
521 };
522
523
528 class DLLEXPORT ObjectReferenceIterator : public std::iterator<std::forward_iterator_tag, BaseObjectData>
529 {
530 public:
531 explicit ObjectReferenceIterator(IteratorRestriction _restriction = ALL_OBJECTS, DataType _dataType = DATA_ALL) :
532 it_(_restriction, _dataType)
533 {
534 }
535
536 explicit ObjectReferenceIterator(BaseObjectData* _pos, IteratorRestriction _restriction = ALL_OBJECTS, DataType _dataType = DATA_ALL) :
537 it_(_pos, _restriction, _dataType)
538 {
539 }
540
541 ObjectReferenceIterator(const ObjectReferenceIterator& _rhs) :
542 it_(_rhs.it_)
543 {
544 }
545
546 ObjectReferenceIterator& operator=(const ObjectReferenceIterator& _rhs)
547 {
548 if (this != &_rhs) {
549 it_ = _rhs.it_;
550 }
551 return *this;
552 }
553
554 ObjectReferenceIterator& operator++() {
555 ++it_;
556 return *this;
557 }
558
559 ObjectReferenceIterator operator++(int) {
560 ObjectReferenceIterator copy(*this);
561 operator++();
562 return copy;
563 }
564
565 bool operator==(const ObjectReferenceIterator& _rhs) const {
566 return it_ == _rhs.it_;
567 }
568
569 bool operator!=(const ObjectReferenceIterator& _rhs) const {
570 return it_ != _rhs.it_;
571 }
572
573 BaseObjectData& operator*() {
574 return **it_;
575 }
576
577 BaseObjectData* operator->() {
578 return *it_;
579 }
580
581 private:
582 ObjectIterator it_;
583 };
584
585
594 class DLLEXPORT ObjectRange {
595 public:
596 explicit ObjectRange(IteratorRestriction _restriction = ALL_OBJECTS , DataType _dataType = DATA_ALL) :
597 restriction_(_restriction),
598 dataType_(_dataType)
599 {
600 }
601
602 ObjectIterator begin() const {
603 return ObjectIterator(restriction_, dataType_);
604 }
605
606 ObjectIterator end() const {
607 return ObjectIterator(0);
608 }
609
610 private:
611 IteratorRestriction restriction_;
612 DataType dataType_;
613 };
614
615
624 class DLLEXPORT ObjectReferenceRange {
625 public:
626 explicit ObjectReferenceRange(IteratorRestriction _restriction = ALL_OBJECTS , DataType _dataType = DATA_ALL) :
627 restriction_(_restriction),
628 dataType_(_dataType)
629 {
630 }
631
632 ObjectReferenceIterator begin() const {
633 return ObjectReferenceIterator(restriction_, dataType_);
634 }
635
636 ObjectReferenceIterator end() const {
637 return ObjectReferenceIterator(0);
638 }
639
640 private:
641 IteratorRestriction restriction_;
642 DataType dataType_;
643 };
644
645
658 DLLEXPORT
659 ObjectReferenceRange objectReferences(IteratorRestriction _restriction = ALL_OBJECTS , DataType _dataType = DATA_ALL);
660
661
675 DLLEXPORT
676 ObjectRange objects(IteratorRestriction _restriction = ALL_OBJECTS , DataType _dataType = DATA_ALL);
677
678
686 class DLLEXPORT BaseObjectIterator {
687
688 public :
689
691 typedef BaseObject value_type;
692
694 typedef BaseObject* value_handle;
695
697 typedef value_type& reference;
698
700 typedef value_type* pointer;
701
709 BaseObjectIterator(IteratorRestriction _restriction = ALL_OBJECTS , DataType _dataType = DATA_ALL );
710
712 BaseObjectIterator(BaseObject* pos, IteratorRestriction _restriction = ALL_OBJECTS , DataType _dataType = DATA_ALL );
713
715 operator value_handle() { return pos_; };
716
718 bool operator==( const BaseObjectIterator& _rhs);
719
721 bool operator!=( const BaseObjectIterator& _rhs);
722
724 BaseObjectIterator& operator=( const BaseObjectIterator& _rhs);
725
727 pointer operator->();
728
730 BaseObjectIterator& operator++();
731
733 BaseObjectIterator& operator--();
734
736 BaseObject* operator*();
737
739 BaseObject* index() { return pos_; };
740
741 private :
743 BaseObject* pos_;
744
746 DataType dataType_;
747
749 IteratorRestriction restriction_;
750
751 };
752
753 // /// Return Iterator to Mesh End
754 // MeshIterator meshes_end();
755
757 DLLEXPORT
758 ObjectIterator objectsEnd();
759
761 DLLEXPORT
762 BaseObjectIterator baseObjectsEnd();
763
766 //=======================================
767 // Dont Use functions below!!!
770 //=======================================
771
773 DLLEXPORT
774 void setDataRoot( BaseObject* _root );
775
778 //=======================================
781 //=======================================
782
788 DLLEXPORT
789 BaseObjectData* baseObjectData( BaseObject* _object );
790
799 DLLEXPORT
800 int viewerId();
801
803 DLLEXPORT
804 BaseObject*& objectRoot();
805
825 DLLEXPORT
826 QString getOpenFileName(const QString &configProperty,
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);
849 DLLEXPORT
850 QString getSaveFileName(const QString &configProperty,
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() );
855
856 } /* namespace PluginFunctions */
857
858 #endif //PLUGINFUNCTIONS_HH
PluginFunctions::viewerId
int viewerId()
Return unique viewer id.
Definition: PluginFunctions.cc:167
PluginFunctions::BaseObjectIterator::value_handle
BaseObject * value_handle
handle type (just an int)
Definition: PluginFunctions.hh:694
PluginFunctions::ALL_OBJECTS
const QStringList ALL_OBJECTS
Iterable object range.
Definition: PluginFunctions.hh:441
PluginFunctions::setViewObjectMarker
void setViewObjectMarker(ViewObjectMarker *_marker)
Definition: PluginFunctions.cc:944
ACG::SceneGraph::BaseNode
Definition: BaseNode.hh:135
PluginFunctions::allowRotation
void allowRotation(bool _mode, int _viewer)
Definition: PluginFunctions.cc:657
ACG::SceneGraph::PickTarget
PickTarget
What target to use for picking.
Definition: BaseNode.hh:99
PluginFunctions::getObjectId
int getObjectId(const QString &_name)
Definition: PluginFunctions.cc:332
PluginFunctions
Definition: PluginFunctionsBSplineCurve.cc:69
PluginFunctions::disableExaminerLightHandling
void disableExaminerLightHandling()
Disable the core light handling.
Definition: PluginFunctions.cc:159
BaseObjectData
Definition: BaseObjectData.hh:105
PluginFunctions::targetCount
int targetCount()
Get the number of target objects.
Definition: PluginFunctions.cc:1010
PluginFunctions::ObjectIterator::restriction_
IteratorRestriction restriction_
Restriction of the iterator.
Definition: PluginFunctions.hh:515
PluginFunctions::ObjectReferenceIterator
Helper class that wraps an ObjectIterator to return a reference instead of a pointer.
Definition: PluginFunctions.hh:528
ACG::SceneGraph::MouseEventAction
Definition: SceneGraph.hh:805
PluginFunctions::visibleCount
int visibleCount()
Get the number of visible objects.
Definition: PluginFunctions.cc:1026
PluginFunctions::getObject
bool getObject(int _identifier, BSplineCurveObject *&_object)
Definition: PluginFunctionsBSplineCurve.cc:75
PluginFunctions::BaseObjectIterator::reference
value_type & reference
reference type
Definition: PluginFunctions.hh:697
PluginFunctions::SOURCE_OBJECTS
const QStringList SOURCE_OBJECTS("source")
Iterable object range.
PluginFunctions::mapToGlobal
QPoint mapToGlobal(const QPoint _point)
Map coordinates of GL Widget to global coordinates.
Definition: PluginFunctions.cc:427
PluginFunctions::getSourceIdentifiers
bool getSourceIdentifiers(std::vector< int > &_identifiers)
Get the identifiers of all objects marked as a source object.
Definition: PluginFunctions.cc:274
PluginFunctions::ObjectIterator::value_type
BaseObjectData value_type
type of the Objects the iterator works on
Definition: PluginFunctions.hh:457
PluginFunctions::getAllObjectIdentifiers
bool getAllObjectIdentifiers(std::vector< int > &_identifiers)
Get identifiers of all objects.
Definition: PluginFunctions.cc:366
PluginFunctions::setEncodedExaminerView
void setEncodedExaminerView(QString _view)
Set the encoded view for the active examiner.
Definition: PluginFunctions.cc:222
PluginFunctions::baseObjectsEnd
DLLEXPORT BaseObjectIterator baseObjectsEnd()
Return Iterator to Object End.
Definition: PluginFunctionsBaseIterator.cc:195
PluginFunctions::examinerLightHandling
bool examinerLightHandling()
returns if internal light handling is active.
Definition: PluginFunctions.cc:163
PluginFunctions::ObjectIterator::value_handle
BaseObjectData * value_handle
handle type (just an int)
Definition: PluginFunctions.hh:460
PluginFunctions::defaultViewObjectMarker
ViewObjectMarker * defaultViewObjectMarker()
Get the default ViewObjectMarker.
Definition: PluginFunctions.cc:955
PluginFunctions::getSceneGraphRootNode
ACG::SceneGraph::BaseNode * getSceneGraphRootNode()
get scenegraph root node
Definition: PluginFunctions.cc:961
PluginFunctions::TARGET_OBJECTS
const QStringList TARGET_OBJECTS("target")
Iterable object range.
ViewObjectMarker
Definition: ViewObjectMarker.hh:91
PluginFunctions::setSceneCenter
void setSceneCenter(const ACG::Vec3d &_center, int _viewer)
Definition: PluginFunctions.cc:766
PluginFunctions::collectObjectComments
QStringList collectObjectComments(bool visibleOnly, bool targetedOnly)
Definition: PluginFunctions.cc:1220
PluginFunctions::scenegraphRegionPick
bool scenegraphRegionPick(ACG::SceneGraph::PickTarget _pickTarget, const QRegion &_region, QList< QPair< unsigned int, unsigned int > > &_list, QVector< float > *_depths, QVector< ACG::Vec3d > *_points)
Definition: PluginFunctions.cc:549
PluginFunctions::collectObjectMaterials
QStringList collectObjectMaterials(bool visibleOnly, bool targetedOnly)
Definition: PluginFunctions.cc:1231
PluginFunctions::setActiveExaminer
void setActiveExaminer(const unsigned int _id)
Set the active id of the examiner which got the last mouse events.
Definition: PluginFunctions.cc:185
PluginFunctions::getCurrentViewImage
void getCurrentViewImage(QImage &_image)
Returns a QImage of the current View.
Definition: PluginFunctions.cc:609
PluginFunctions::objectReferences
ObjectReferenceRange objectReferences(IteratorRestriction _restriction, DataType _dataType)
Iterable object range.
Definition: PluginFunctions.cc:1263
PluginFunctions::pickMode
const std::string pickMode()
Get the current Picking mode.
Definition: PluginFunctions.cc:579
PluginFunctions::setDataRoot
void setDataRoot(BaseObject *_root)
Definition: PluginFunctions.cc:151
PluginFunctions::getSaveFileName
QString getSaveFileName(const QString &configProperty, QWidget *parent, const QString &caption, const QString &defaultDir, const QString &filter, QString *selectedFilter, QFileDialog::Options options, const QString &defaultSuffix)
Definition: PluginFunctions.cc:1188
PluginFunctions::ObjectIterator
Core Data Iterator.
Definition: PluginFunctions.hh:452
PluginFunctions::objectsEnd
DLLEXPORT ObjectIterator objectsEnd()
Return Iterator to Object End.
Definition: PluginFunctionsIterator.cc:187
PluginFunctions::addGlobalStatusNode
void addGlobalStatusNode(ACG::SceneGraph::BaseNode *_node)
Adds a global status node.
Definition: PluginFunctions.cc:969
PluginFunctions::ObjectRange
Range adapter for ObjectIterator.
Definition: PluginFunctions.hh:594
BaseObject
Definition: BaseObject.hh:94
PluginFunctions::objectRoot
BaseObject *& objectRoot()
Get the root of the object structure.
Definition: PluginFunctions.cc:1103
PluginFunctions::getEncodedExaminerView
QString getEncodedExaminerView()
Get the encoded view for the active examiner.
Definition: PluginFunctions.cc:202
PluginFunctions::getOpenFileName
QString getOpenFileName(const QString &configProperty, QWidget *parent, const QString &caption, const QString &defaultDir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
Definition: PluginFunctions.cc:1175
OpenMesh::VectorT
Definition: Vector11T.hh:83
PluginFunctions::addGlobalNode
void addGlobalNode(ACG::SceneGraph::BaseNode *_node)
Add a global node.
Definition: PluginFunctions.cc:983
PluginFunctions::getRootNode
ACG::SceneGraph::BaseNode * getRootNode()
Get the root node for data objects.
Definition: PluginFunctions.cc:965
PluginFunctions::viewers
int viewers()
Get the number of viewers.
Definition: PluginFunctions.cc:155
PluginFunctions::BaseObjectIterator::dataType_
DataType dataType_
returned data types of the iterator
Definition: PluginFunctions.hh:746
DATA_ALL
const DataType DATA_ALL(UINT_MAX)
Identifier for all available objects.
PluginFunctions::addObjectRenderingNode
void addObjectRenderingNode(ACG::SceneGraph::BaseNode *_node)
Add scenegraph node modifing object rendering.
Definition: PluginFunctions.cc:989
PluginFunctions::shareGLWidget
void shareGLWidget(QGLWidget *_widget)
Sets the main QGLWidget for gl data sharing.
Definition: PluginFunctions.cc:599
PluginFunctions::ObjectIterator::pointer
value_type * pointer
basic pointer type
Definition: PluginFunctions.hh:466
PluginFunctions::ObjectIterator::reference
value_type & reference
reference type
Definition: PluginFunctions.hh:463
SceneGraph.hh
PluginFunctions::setDefaultViewObjectMarker
void setDefaultViewObjectMarker(ViewObjectMarker *_marker)
Definition: PluginFunctions.cc:950
DLLEXPORT
#define DLLEXPORT
Definition: GlobalDefines.hh:107
PluginFunctions::getAllMeshes
bool getAllMeshes(std::vector< int > &_identifiers)
Get identifiers of all meshes.
Definition: PluginFunctions.cc:353
PluginFunctions::getTargetIdentifiers
bool getTargetIdentifiers(std::vector< int > &_identifiers)
Get the identifiers of all objects marked as a target object.
Definition: PluginFunctions.cc:284
PluginFunctions::sourceCount
int sourceCount()
Get the number of source objects.
Definition: PluginFunctions.cc:1014
PluginFunctions::mapToLocal
QPoint mapToLocal(const QPoint _point)
Map global coordinates to GL Widget local coordinates.
Definition: PluginFunctions.cc:431
PluginFunctions::objectCount
int objectCount()
Get the number of available objects.
Definition: PluginFunctions.cc:1004
PluginFunctions::scenegraphPick
bool scenegraphPick(ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, unsigned int &_nodeIdx, unsigned int &_targetIdx, ACG::Vec3d *_hitPointPtr=0)
Execute picking operation on scenegraph.
Definition: PluginFunctions.cc:482
PluginFunctions::baseObjectData
BaseObjectData * baseObjectData(BaseObject *_object)
Cast an BaseObject to a BaseObjectData if possible.
Definition: PluginFunctions.cc:1093
PluginFunctions::IteratorRestriction
QStringList IteratorRestriction
Iterable object range.
Definition: PluginFunctions.hh:439
PluginFunctions::objects
ObjectRange objects(IteratorRestriction _restriction, DataType _dataType)
Iterable object range.
Definition: PluginFunctions.cc:1259
PluginFunctions::BaseObjectIterator
Core Data Iterator used to iterate over all objects (Including groups)
Definition: PluginFunctions.hh:686
PluginFunctions::ObjectIterator::dataType_
DataType dataType_
returned data types of the iterator
Definition: PluginFunctions.hh:512
DataType
Predefined datatypes.
Definition: DataTypes.hh:96
PluginFunctions::actionMode
Viewer::ActionMode actionMode()
Get the current Action mode.
Definition: PluginFunctions.cc:590
Types.hh
PluginFunctions::activeExaminer
unsigned int activeExaminer()
Get the id of the examiner which got the last mouse events.
Definition: PluginFunctions.cc:198
PluginFunctions::getPickedObject
bool getPickedObject(const unsigned int _node_idx, BaseObjectData *&_object)
Get the picked mesh.
Definition: PluginFunctions.cc:263
PluginFunctions::BaseObjectIterator::value_type
BaseObject value_type
type of the Objects the iterator works on
Definition: PluginFunctions.hh:691
PluginFunctions::BaseObjectIterator::pointer
value_type * pointer
basic pointer type
Definition: PluginFunctions.hh:700
PluginFunctions::ObjectReferenceRange
Range adapter for ObjectIterator.
Definition: PluginFunctions.hh:624
PluginFunctions::BaseObjectIterator::restriction_
IteratorRestriction restriction_
Restriction of the iterator.
Definition: PluginFunctions.hh:749
PluginFunctions::traverse
void traverse(ACG::SceneGraph::MouseEventAction &_action)
Definition: PluginFunctions.cc:573
PluginFunctions::objectExists
bool objectExists(const int _identifier)
Check if an object with this identifier exists.
Definition: PluginFunctions.cc:342