Commit b20d3218 authored by Jan Möbius's avatar Jan Möbius

Cleanup Henriks picking functions in Pluginfunctions as well

refs #479

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14507 383ad7c9-94d9-4d36-a494-682f7c89f535
parent e09f24b3
......@@ -469,88 +469,27 @@ bool scenegraphPick( const unsigned int _examiner, ACG::SceneGraph::PickTarget _
return examiner_widgets_[_examiner]->pick( _pickTarget,_mousePos,_nodeIdx,_targetIdx,_hitPointPtr );
}
bool scenegraphRegionPick( ACG::SceneGraph::PickTarget _pickTarget,
const QRegion& _region,
QList<QPair<unsigned int, unsigned int> >& _list)
{
return examiner_widgets_[activeExaminer_]->pick_region( _pickTarget, _region, _list, 0 , 0);
}
bool scenegraphRegionPick( const unsigned int _examiner,
ACG::SceneGraph::PickTarget _pickTarget,
const QRegion& _region,
QList<QPair<unsigned int, unsigned int> >& _list)
{
if ( _examiner >= examiner_widgets_.size() ) {
std::cerr << "Wrong examiner id" << std::endl;
return false;
}
return examiner_widgets_[activeExaminer_]->pick_region( _pickTarget, _region, _list, 0, 0);
}
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, 0, &_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_[activeExaminer_]->pick_region( _pickTarget, _region, _list, 0, &_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, 0);
}
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_[activeExaminer_]->pick_region( _pickTarget, _region, _list, &_depths, 0);
}
bool scenegraphRegionPick( ACG::SceneGraph::PickTarget _pickTarget,
const QRegion& _region,
QList<QPair<unsigned int, unsigned int> >& _list,
QVector<float>& _depths,
QVector<ACG::Vec3d>& _points)
QVector<float>* _depths,
QVector<ACG::Vec3d>* _points)
{
return examiner_widgets_[activeExaminer_]->pick_region( _pickTarget, _region, _list, &_depths, &_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)
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);
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!!
......
......@@ -256,86 +256,22 @@ bool scenegraphPick( const unsigned int _examiner ,ACG::SceneGraph::PickTarget _
* Set by mouseevents from the core
*/
DLLEXPORT
bool scenegraphRegionPick( ACG::SceneGraph::PickTarget _pickTarget,
const QRegion& _region,
QList<QPair<unsigned int, unsigned int> >& _list);
/** 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);
/** 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);
QVector<float>* _depths = 0,
QVector<ACG::Vec3d>* _points = 0);
/** 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);
QVector<float>* _depths = 0,
QVector<ACG::Vec3d>* _points = 0);
/** 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
......@@ -344,7 +280,6 @@ bool scenegraphRegionPick( const unsigned int _examiner,
DLLEXPORT
void traverse( ACG::SceneGraph::MouseEventAction &_action );
/// Get the current Picking mode
DLLEXPORT
const std::string pickMode ();
......
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