Commit 04e2af64 authored by Henrik Zimmer's avatar Henrik Zimmer

pick viewport regions

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@9522 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b22e1482
......@@ -488,7 +488,70 @@ bool scenegraphRegionPick( const unsigned int _examiner,
return examiner_widgets_[_examiner]->pick_region( _pickTarget, _region, _list);
}
bool scenegraphRegionPick( ACG::SceneGraph::PickTarget _pickTarget,
const QRegion& _region,
QList<QPair<unsigned int, unsigned int> >& _list,
QVector<ACG::Vec3d>& _points)
{
return examiner_widgets_[activeExaminer_]->pick_region( _pickTarget, _region, _list, _points);
}
bool scenegraphRegionPick( const unsigned int _examiner,
ACG::SceneGraph::PickTarget _pickTarget,
const QRegion& _region,
QList<QPair<unsigned int, unsigned int> >& _list,
QVector<ACG::Vec3d>& _points)
{
if ( _examiner >= examiner_widgets_.size() ) {
std::cerr << "Wrong examiner id" << std::endl;
return false;
}
return examiner_widgets_[_examiner]->pick_region( _pickTarget, _region, _list, _points);
}
bool scenegraphRegionPick( ACG::SceneGraph::PickTarget _pickTarget,
const QRegion& _region,
QList<QPair<unsigned int, unsigned int> >& _list,
QVector<float>& _depths)
{
return examiner_widgets_[activeExaminer_]->pick_region( _pickTarget, _region, _list, _depths);
}
bool scenegraphRegionPick( const unsigned int _examiner,
ACG::SceneGraph::PickTarget _pickTarget,
const QRegion& _region,
QList<QPair<unsigned int, unsigned int> >& _list,
QVector<float>& _depths)
{
if ( _examiner >= examiner_widgets_.size() ) {
std::cerr << "Wrong examiner id" << std::endl;
return false;
}
return examiner_widgets_[_examiner]->pick_region( _pickTarget, _region, _list, _depths);
}
bool scenegraphRegionPick( ACG::SceneGraph::PickTarget _pickTarget,
const QRegion& _region,
QList<QPair<unsigned int, unsigned int> >& _list,
QVector<float>& _depths,
QVector<ACG::Vec3d>& _points)
{
return examiner_widgets_[activeExaminer_]->pick_region( _pickTarget, _region, _list, _depths, _points);
}
bool scenegraphRegionPick( const unsigned int _examiner,
ACG::SceneGraph::PickTarget _pickTarget,
const QRegion& _region,
QList<QPair<unsigned int, unsigned int> >& _list,
QVector<float>& _depths,
QVector<ACG::Vec3d>& _points)
{
if ( _examiner >= examiner_widgets_.size() ) {
std::cerr << "Wrong examiner id" << std::endl;
return false;
}
return examiner_widgets_[_examiner]->pick_region( _pickTarget, _region, _list, _depths, _points);
}
//Warning : Dont use template function as external static pointer for examiner widget is not resolved correctly!!
void traverse( ACG::SceneGraph::MouseEventAction &_action ) {
......@@ -1035,4 +1098,4 @@ QMap< std::string ,ACG::QtWidgets::SceneGraphWidgetGenerator* > getSceneGraphGen
return sceneGraphGenerators_;
}
} // End namespace PluginFunctions
\ No newline at end of file
} // End namespace PluginFunctions
......@@ -275,6 +275,73 @@ bool scenegraphRegionPick( const unsigned int _examiner,
QList<QPair<unsigned int, unsigned int> >& _list);
/** Execute picking operation on scenegraph
* This picking function will pick in the last active examiner context which is automatically
* The 3d Position of each target/node element is stored in the _points vector.
* Set by mouseevents from the core
*/
DLLEXPORT
bool scenegraphRegionPick( ACG::SceneGraph::PickTarget _pickTarget,
const QRegion& _region,
QList<QPair<unsigned int, unsigned int> >& _list,
QVector<ACG::Vec3d>& _points);
/** Execute picking operation on scenegraph
* This picking function will pick in the specified examiner context
* The 3d Position of each target/node element is stored in the _points vector.
*/
DLLEXPORT
bool scenegraphRegionPick( const unsigned int _examiner,
ACG::SceneGraph::PickTarget _pickTarget,
const QRegion& _region,
QList<QPair<unsigned int, unsigned int> >& _list,
QVector<ACG::Vec3d>& _points);
/** Execute picking operation on scenegraph
* This picking function will pick in the last active examiner context which is automatically
* The depth of each target/node element is stored in the _depths vector.
* Set by mouseevents from the core
*/
DLLEXPORT
bool scenegraphRegionPick( ACG::SceneGraph::PickTarget _pickTarget,
const QRegion& _region,
QList<QPair<unsigned int, unsigned int> >& _list,
QVector<float>& _depths);
/** Execute picking operation on scenegraph
* This picking function will pick in the specified examiner context
* The depth of each target/node element is stored in the _depths vector.
*/
DLLEXPORT
bool scenegraphRegionPick( const unsigned int _examiner,
ACG::SceneGraph::PickTarget _pickTarget,
const QRegion& _region,
QList<QPair<unsigned int, unsigned int> >& _list,
QVector<float>& _depths);
/** Execute picking operation on scenegraph
* This picking function will pick in the last active examiner context which is automatically
* Set by mouseevents from the core
*/
DLLEXPORT
bool scenegraphRegionPick( ACG::SceneGraph::PickTarget _pickTarget,
const QRegion& _region,
QList<QPair<unsigned int, unsigned int> >& _list,
QVector<float>& _depths,
QVector<ACG::Vec3d>& _points);
/** Execute picking operation on scenegraph
* This picking function will pick in the specified examiner context
*/
DLLEXPORT
bool scenegraphRegionPick( const unsigned int _examiner,
ACG::SceneGraph::PickTarget _pickTarget,
const QRegion& _region,
QList<QPair<unsigned int, unsigned int> >& _list,
QVector<float>& _depths,
QVector<ACG::Vec3d>& _points);
/** Execute Scenegraph traversal with action and use the last active examiner
* If you are reacting on a mouseEvent you should use this function as it will
* automatically set the right view
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment