diff --git a/ACG/GL/DrawMeshT.cc b/ACG/GL/DrawMeshT.cc index c38b60ba57f89bd891850315e3bbcf702e103684..b83ac5dbc7c04501d71ae82a8307ee65e184d40b 100644 --- a/ACG/GL/DrawMeshT.cc +++ b/ACG/GL/DrawMeshT.cc @@ -626,7 +626,7 @@ DrawMeshT::rebuild() if (baseProp) { - int numAttribs = baseProp->n_elements(); + size_t numAttribs = baseProp->n_elements(); const void* attribData = propDesc->propDataPtr_; meshComp_->setAttribVec( propDesc->declElementID_, numAttribs, attribData ); diff --git a/ACG/GL/MeshCompiler.cc b/ACG/GL/MeshCompiler.cc index 90347a478a10cee69bdc64b43084397d91e92ed4..75bc7511ceb8423af9b1d1772c5d08c600a3150d 100644 --- a/ACG/GL/MeshCompiler.cc +++ b/ACG/GL/MeshCompiler.cc @@ -256,23 +256,23 @@ void MeshCompiler::computeAdjacency(bool _forceRecompute) } -void MeshCompiler::setVertices( int _num, const void* _data, int _stride, bool _internalCopy /*= false*/, GLuint _fmt, int _elementSize ) +void MeshCompiler::setVertices( size_t _num, const void* _data, size_t _stride, bool _internalCopy /*= false*/, GLuint _fmt, int _elementSize ) { setAttribVec(inputIDPos_, _num, _data, _stride, _internalCopy, _fmt, _elementSize); } -void MeshCompiler::setNormals( int _num, const void* _data, int _stride, bool _internalCopy /*= false*/, GLuint _fmt, int _elementSize ) +void MeshCompiler::setNormals( size_t _num, const void* _data, size_t _stride, bool _internalCopy /*= false*/, GLuint _fmt, int _elementSize ) { setAttribVec(inputIDNorm_, _num, _data, _stride, _internalCopy, _fmt, _elementSize); } -void MeshCompiler::setTexCoords( int _num, const void* _data, int _stride, bool _internalCopy /*= false*/, GLuint _fmt, int _elementSize ) +void MeshCompiler::setTexCoords( size_t _num, const void* _data, size_t _stride, bool _internalCopy /*= false*/, GLuint _fmt, int _elementSize ) { setAttribVec(inputIDTexC_, _num, _data, _stride, _internalCopy, _fmt, _elementSize); } -void MeshCompiler::setAttribVec(int _attrIdx, int _num, const void* _data, int _stride, bool _internalCopy /*= false*/, GLuint _fmt, int _elementSize) +void MeshCompiler::setAttribVec(int _attrIdx, size_t _num, const void* _data, size_t _stride, bool _internalCopy /*= false*/, GLuint _fmt, int _elementSize) { // sets vertex data for each attribute individually // Example: @@ -307,7 +307,7 @@ void MeshCompiler::setAttribVec(int _attrIdx, int _num, const void* _data, int _ if (_data) { // copy elementwise because of striding - for (int i = 0; i < _num; ++i) + for (size_t i = 0; i < _num; ++i) { memcpy(inbuf->internalBuf + (size_t)(size * i), (const char*)_data + (size_t)(_stride * i), diff --git a/ACG/GL/MeshCompiler.hh b/ACG/GL/MeshCompiler.hh index 102d77c811e302ab7a720c42a78ecbd29aa98b5a..e4da6e0a5847c3c1d9d84439871eaf7d50a758f9 100644 --- a/ACG/GL/MeshCompiler.hh +++ b/ACG/GL/MeshCompiler.hh @@ -265,7 +265,7 @@ public: * @param _fmt data format of one element (must be set if input data does not match vertex declaration) * @param _elementSize number of elements per attribute (i.e. 3 for vec3 .., -1 if unknown) */ - void setVertices(int _num, const void* _data, int _stride = 0, bool _internalCopy = false, GLuint _fmt = 0, int _elementSize = -1); + void setVertices(size_t _num, const void* _data, size_t _stride = 0, bool _internalCopy = false, GLuint _fmt = 0, int _elementSize = -1); /** set input normals * @@ -276,7 +276,7 @@ public: * @param _fmt data format of one element (must be set if input data does not match vertex declaration) * @param _elementSize number of elements per attribute (i.e. 3 for vec3 .., -1 if unknown) */ - void setNormals(int _num, const void* _data, int _stride = 0, bool _internalCopy = false, GLuint _fmt = 0, int _elementSize = -1); + void setNormals(size_t _num, const void* _data, size_t _stride = 0, bool _internalCopy = false, GLuint _fmt = 0, int _elementSize = -1); /** set input texture coords * @@ -287,7 +287,7 @@ public: * @param _fmt data format of one element (must be set if input data does not match vertex declaration) * @param _elementSize number of elements per attribute (i.e. 3 for vec3 .., -1 if unknown) */ - void setTexCoords(int _num, const void* _data, int _stride = 0, bool _internalCopy = false, GLuint _fmt = 0, int _elementSize = -1); + void setTexCoords(size_t _num, const void* _data, size_t _stride = 0, bool _internalCopy = false, GLuint _fmt = 0, int _elementSize = -1); /** Set custom input attribute. * @@ -300,7 +300,7 @@ public: * @param _fmt data format of one element (must be set if input data does not match vertex declaration) * @param _elementSize number of elements per attribute (i.e. 3 for vec3 .., -1 if unknown) */ - void setAttribVec(int _attrIdx, int _num, const void* _data, int _stride = 0, bool _internalCopy = false, GLuint _fmt = 0, int _elementSize = -1); + void setAttribVec(int _attrIdx, size_t _num, const void* _data, size_t _stride = 0, bool _internalCopy = false, GLuint _fmt = 0, int _elementSize = -1); /** Set single custom input attributes. * diff --git a/ACG/QtWidgets/QtPrincipalAxisDialog.cc b/ACG/QtWidgets/QtPrincipalAxisDialog.cc index 4f8bf565d9cfd094fa14706e95127ae3654ec31f..3aaeaebb89bb7369b5e406c8585cf08e05862e33 100644 --- a/ACG/QtWidgets/QtPrincipalAxisDialog.cc +++ b/ACG/QtWidgets/QtPrincipalAxisDialog.cc @@ -213,7 +213,7 @@ const QtPrincipalAxisDialog::ColorScheme &QtPrincipalAxisDialog::getSelectedColo void QtPrincipalAxisDialog::setColorScheme(ColorScheme cs) { float best_match = std::numeric_limits::infinity(); - int best_match_i = -1; + size_t best_match_i = std::numeric_limits::max(); for (size_t i = 0; i < N_COLOR_SCHEMES; ++i) { float match = colorSchemeDistance(cs, color_schemes_[i]); diff --git a/ACG/Scenegraph/PrincipalAxisNode.cc b/ACG/Scenegraph/PrincipalAxisNode.cc index 79759af3033af81b3ce5c2011165a0a9023594bd..1af7fff26cb56ae9a84c9c5ae5b015dd3af59662 100644 --- a/ACG/Scenegraph/PrincipalAxisNode.cc +++ b/ACG/Scenegraph/PrincipalAxisNode.cc @@ -102,9 +102,9 @@ PrincipalAxisNode::PrincipalAxisNode( BaseNode* _parent, updateVBO_(true) { static const Vec4f default_cols[3] = { - Vec4f(0.91, 0.11, 0.09, 1.0), - Vec4f(0.0, .43, 1.0, 1.0), - Vec4f(0.0, 0.70, 0.0, 1.0) + Vec4f(0.91f, 0.11f, 0.09f, 1.0f), + Vec4f(0.0f, .43f, 1.0f , 1.0f), + Vec4f(0.0f, 0.70f, 0.0f , 1.0f) }; for (int i = 0; i < 3; ++i) { for (int j = 0; j < 4; ++j) { @@ -172,15 +172,15 @@ show_tensor_component(unsigned int _i, unsigned char _show) void PrincipalAxisNode:: -resize(unsigned int _n) +resize(size_t _n) { - unsigned int old_n = pc_.size(); + size_t old_n = pc_.size(); pc_.resize(_n); draw_pc_.resize(_n); // initialize new draw_pc_ values - for(unsigned int i=old_n; i<_n; ++i) + for(size_t i=old_n; i<_n; ++i) draw_pc_[i] = false; auto_update_range(); @@ -192,7 +192,7 @@ resize(unsigned int _n) void PrincipalAxisNode:: -enable ( unsigned int _i) +enable ( size_t _i) { if(_i < draw_pc_.size()) { @@ -211,7 +211,7 @@ enable ( unsigned int _i) void PrincipalAxisNode:: -disable ( unsigned int _i) +disable ( size_t _i) { if(_i < draw_pc_.size()) { @@ -232,7 +232,7 @@ void PrincipalAxisNode:: disable_all() { - for(unsigned int i=0; i::max(); max_abs_value_ = 0.0; - for(unsigned int i=0; i 1e-10) { glPushMatrix(); - unsigned int slices(8); Vec3d direction = _axis; Vec3d z_axis(0,0,1); @@ -640,7 +637,7 @@ draw_line( const Vec3d& _axis, double _w) glLineWidth(_w); glBegin(GL_LINES); - glVertex3f(0,0,0); + glVertex3f(0.0f,0.0f,0.0f); glVertex3f(_axis[0], _axis[1], _axis[2]); glEnd(); } @@ -676,8 +673,8 @@ pick(GLState& /*_state*/, PickTarget _target) void PrincipalAxisNode::set_axes_colors(const Vec4f colors[3]) { - for (int i = 0; i < 3; ++i) { - for (int j = 0; j < 4; ++j) { + for (size_t i = 0; i < 3; ++i) { + for (size_t j = 0; j < 4; ++j) { axes_colors[i][j] = colors[i][j]; } } @@ -687,8 +684,8 @@ void PrincipalAxisNode::set_axes_colors(const Vec4f colors[3]) { } void PrincipalAxisNode::get_axes_colors(Vec4f out_colors[3]) const { - for (int i = 0; i < 3; ++i) { - for (int j = 0; j < 4; ++j) { + for (size_t i = 0; i < 3; ++i) { + for (size_t j = 0; j < 4; ++j) { out_colors[i][j] = axes_colors[i][j]; } } @@ -854,7 +851,7 @@ void PrincipalAxisNode::getRenderObjects(IRenderer* _renderer, GLState& _state, int numInstances = 0; int visibleTensors = 0; - for (unsigned int k = 0; k < 3; ++k) + for (size_t k = 0; k < 3; ++k) { if (show_tensor_component_[k]) ++visibleTensors; @@ -1120,7 +1117,7 @@ void PrincipalAxisNode::emitIndividualRenderobjects(IRenderer* _renderer, GLStat } - for (unsigned int i = 0; i < pc_.size(); ++i) + for (size_t i = 0; i < pc_.size(); ++i) { if (draw_pc_[i]) { diff --git a/ACG/Scenegraph/PrincipalAxisNode.hh b/ACG/Scenegraph/PrincipalAxisNode.hh index 0f1df0b6268bce206eda75420db24b16524b6338..cf4af4ae614af9b85b6c2e53da2a0f75c96f30f0 100644 --- a/ACG/Scenegraph/PrincipalAxisNode.hh +++ b/ACG/Scenegraph/PrincipalAxisNode.hh @@ -166,15 +166,15 @@ public: void show_tensor_component(unsigned int _i, unsigned char _show); // number of tensors to display - unsigned int size() {return pc_.size();} + size_t size() {return pc_.size();} - void resize( unsigned int _n); + void resize( size_t _n); void clear() { pc_.clear(); invalidateInstanceData_ = true; } // enable/disable drawing the _i'th PC - void enable ( unsigned int _i); - void disable( unsigned int _i); + void enable ( size_t _i); + void disable( size_t _i); void disable_all(); // set properties of Principal component @@ -182,8 +182,8 @@ public: void set_vector( unsigned int _i, const Vec3d _p, const VectorT& _v); template void set_matrix( unsigned int _i, const Vec3d _p, const MatrixT& _m); - void set( unsigned int _i, const PrincipalComponent& _pc); - void get( unsigned int _i, PrincipalComponent& _pc); + void set( size_t _i, const PrincipalComponent& _pc); + void get( size_t _i, PrincipalComponent& _pc); void add( const PrincipalComponent& _pc, bool _enable = true); // enable automatic range clamping void set_auto_range( bool _b); diff --git a/CI/ci-cppcheck.sh b/CI/ci-cppcheck.sh index 116585d4a753e1255acda3e1bd4ca8ca46a9a166..9a32384435b1bea8cf86fa4963bc595b21885cc5 100755 --- a/CI/ci-cppcheck.sh +++ b/CI/ci-cppcheck.sh @@ -59,7 +59,7 @@ echo "CPPCHECK Summary" echo "==============================================================================" echo -e "${NC}" -if [ $COUNT -gt 54 ]; then +if [ $COUNT -gt 45 ]; then echo -e ${WARNING} echo "Total CPPCHECK error Count is $COUNT, which is too High! CPPCHECK Run failed"; echo -e "${NC}" diff --git a/ObjectTypes/Plane/QtPlaneSelect.cc b/ObjectTypes/Plane/QtPlaneSelect.cc index 6832ac7ca1f9463be680d602bd0f6ce6c5606078..0f9c56ee1d3fb8744836e657c55326f215711939 100644 --- a/ObjectTypes/Plane/QtPlaneSelect.cc +++ b/ObjectTypes/Plane/QtPlaneSelect.cc @@ -127,7 +127,7 @@ void QtPlaneSelect::slotMouseEvent(QMouseEvent* event) return; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, event->pos(), diff --git a/ObjectTypes/PolyLine/PolyLineBezierSplineData.hh b/ObjectTypes/PolyLine/PolyLineBezierSplineData.hh index 4908c0e1267a593dae2c2b5bc0b88c88db4c59eb..8012e81350309d3b56b9d8823e0750dd57df539a 100644 --- a/ObjectTypes/PolyLine/PolyLineBezierSplineData.hh +++ b/ObjectTypes/PolyLine/PolyLineBezierSplineData.hh @@ -69,7 +69,7 @@ public: std::vector points_; std::vector handles_; /// Index of the corresponding mesh - unsigned int meshIndex_; + size_t meshIndex_; public: diff --git a/ObjectTypes/PolyLine/PolyLineCircleData.hh b/ObjectTypes/PolyLine/PolyLineCircleData.hh index de1957f50c0fed6bbf25b62207f5ddf94a01cdc4..accfb1930af3b8162c5ad95299db70e914599634 100644 --- a/ObjectTypes/PolyLine/PolyLineCircleData.hh +++ b/ObjectTypes/PolyLine/PolyLineCircleData.hh @@ -64,7 +64,7 @@ public: ACG::Vec3d circleSideAxis_; double circleMainRadius_; double circleSideRadius_; - unsigned int circleMeshIndex_; + size_t circleMeshIndex_; public: PolyLineCircleData(ACG::Vec3d center, ACG::Vec3d normal, ACG::Vec3d mainAxis, ACG::Vec3d sideAxis, double mainR, double sideR, unsigned int mesh); diff --git a/OpenFlipper/BasePlugin/PluginFunctions.cc b/OpenFlipper/BasePlugin/PluginFunctions.cc index 861b38570d586c9d75f9a47eeaf7cea16d01e312..08f02f1f4991d6e61007f4d83531eacaf17f75ae 100644 --- a/OpenFlipper/BasePlugin/PluginFunctions.cc +++ b/OpenFlipper/BasePlugin/PluginFunctions.cc @@ -260,7 +260,7 @@ void setSceneGraphRootNodeGlobal( SeparatorNode* _root_node ) { PluginFunctions::sceneGraphRootNodeGlobal_ = _root_node; } -bool getPickedObject(const unsigned int _node_idx , BaseObjectData*& _object) { +bool getPickedObject(const size_t _node_idx , BaseObjectData*& _object) { for ( ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ; o_it != PluginFunctions::objectsEnd(); ++o_it) { if ( o_it->picked( _node_idx ) ) { _object = *o_it; @@ -479,13 +479,13 @@ void viewingRay(int _x, int _y, } // Pick returning node index -bool scenegraphPick( ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, unsigned int &_nodeIdx, unsigned int &_targetIdx, ACG::Vec3d *_hitPointPtr=0 ) { +bool scenegraphPick( ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, size_t &_nodeIdx, size_t &_targetIdx, ACG::Vec3d *_hitPointPtr=0 ) { return examiner_widgets_[activeExaminer_]->pick( _pickTarget,_mousePos,_nodeIdx,_targetIdx,_hitPointPtr ); } // Pick returning node index -bool scenegraphPick( const unsigned int _examiner, ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, unsigned int &_nodeIdx, unsigned int &_targetIdx, ACG::Vec3d *_hitPointPtr=0 ) { +bool scenegraphPick( const unsigned int _examiner, ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, size_t &_nodeIdx, size_t &_targetIdx, ACG::Vec3d *_hitPointPtr=0 ) { if ( _examiner >= examiner_widgets_.size() ) { std::cerr << "Wrong examiner id" << std::endl; @@ -500,13 +500,13 @@ bool scenegraphPick( const unsigned int _examiner , ACG::SceneGraph::PickTarget _pickTarget, const QPoint & _mousePos, BaseObjectData*& _object, - unsigned int & _targetIdx, + size_t & _targetIdx, const bool _refine, ACG::Vec3d * _hitPointPtr ) { - unsigned int nodeIdx = 0; + size_t nodeIdx = 0; - bool ok = scenegraphPick(_examiner,_pickTarget,_mousePos,nodeIdx,_targetIdx,_hitPointPtr); + bool ok = scenegraphPick(_examiner,_pickTarget,_mousePos, nodeIdx,_targetIdx,_hitPointPtr); // If successfully picked and object is found if ( ok && PluginFunctions::getPickedObject(nodeIdx, _object) ) { @@ -535,7 +535,7 @@ bool scenegraphPick( const unsigned int _examiner , bool scenegraphPick( ACG::SceneGraph::PickTarget _pickTarget, const QPoint & _mousePos, BaseObjectData*& _object, - unsigned int & _targetIdx, + size_t & _targetIdx, const bool _refine, ACG::Vec3d * _hitPointPtr ) { @@ -548,7 +548,7 @@ bool scenegraphPick( ACG::SceneGraph::PickTarget _pickTarget, bool scenegraphRegionPick( ACG::SceneGraph::PickTarget _pickTarget, const QRegion& _region, - QList >& _list, + QList >& _list, QVector* _depths, QVector* _points) { @@ -558,7 +558,7 @@ bool scenegraphRegionPick( ACG::SceneGraph::PickTarget _pickTarge bool scenegraphRegionPick( const unsigned int _examiner, ACG::SceneGraph::PickTarget _pickTarget, const QRegion& _region, - QList >& _list, + QList >& _list, QVector* _depths, QVector* _points) { diff --git a/OpenFlipper/BasePlugin/PluginFunctions.hh b/OpenFlipper/BasePlugin/PluginFunctions.hh index dc5df3815428dd185ff8365b67040af8bc65e2f1..1e315ce12f1aec29e5f0564687916934a25bf833 100644 --- a/OpenFlipper/BasePlugin/PluginFunctions.hh +++ b/OpenFlipper/BasePlugin/PluginFunctions.hh @@ -93,7 +93,7 @@ namespace PluginFunctions { * @return true if mesh was found, false if picked object is not a mesh or not found */ DLLEXPORT -bool getPickedObject(const unsigned int _node_idx , BaseObjectData*& _object); +bool getPickedObject(const size_t _node_idx , BaseObjectData*& _object); /** @} */ @@ -250,14 +250,14 @@ void setSceneCenter(const ACG::Vec3d& _center, int _viewer ); * set by the last mouse event from the core */ DLLEXPORT -bool scenegraphPick( ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, unsigned int &_nodeIdx, unsigned int &_targetIdx, ACG::Vec3d *_hitPointPtr ); +bool scenegraphPick( ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, size_t &_nodeIdx, size_t &_targetIdx, ACG::Vec3d *_hitPointPtr ); /** \brief Execute picking operation on scenegraph * * This picking function will pick in the specified examiner context */ DLLEXPORT -bool scenegraphPick( const unsigned int _examiner ,ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, unsigned int &_nodeIdx, unsigned int &_targetIdx, ACG::Vec3d *_hitPointPtr ); +bool scenegraphPick( const unsigned int _examiner ,ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, size_t &_nodeIdx, size_t &_targetIdx, ACG::Vec3d *_hitPointPtr ); /** \brief Execute picking operation on scenegraph and return object * @@ -266,7 +266,7 @@ bool scenegraphPick( const unsigned int _examiner ,ACG::SceneGraph::PickTarget _ * the picked object will be called in order to achieve higher picking accuracy */ DLLEXPORT -bool scenegraphPick( const unsigned int _examiner ,ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, BaseObjectData*& _object, unsigned int &_targetIdx, const bool _refine ,ACG::Vec3d *_hitPointPtr ); +bool scenegraphPick( const unsigned int _examiner ,ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, BaseObjectData*& _object, size_t &_targetIdx, const bool _refine ,ACG::Vec3d *_hitPointPtr ); /** \brief Execute picking operation on scenegraph and return object * @@ -275,7 +275,7 @@ bool scenegraphPick( const unsigned int _examiner ,ACG::SceneGraph::PickTarget _ * the picked object will be called in order to achieve higher picking accuracy */ DLLEXPORT -bool scenegraphPick( ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, BaseObjectData*& _object, unsigned int &_targetIdx, const bool _refine, ACG::Vec3d *_hitPointPtr ); +bool scenegraphPick( ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, BaseObjectData*& _object, size_t &_targetIdx, const bool _refine, ACG::Vec3d *_hitPointPtr ); /** Execute picking operation on scenegraph @@ -285,7 +285,7 @@ bool scenegraphPick( ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mou DLLEXPORT bool scenegraphRegionPick( ACG::SceneGraph::PickTarget _pickTarget, const QRegion& _region, - QList >& _list, + QList >& _list, QVector* _depths = 0, QVector* _points = 0); @@ -296,7 +296,7 @@ DLLEXPORT bool scenegraphRegionPick( const unsigned int _examiner, ACG::SceneGraph::PickTarget _pickTarget, const QRegion& _region, - QList >& _list, + QList >& _list, QVector* _depths = 0, QVector* _points = 0); diff --git a/OpenFlipper/Core/Core.cc b/OpenFlipper/Core/Core.cc index d9d715e4283bff43f58376fdea5f63b8627e3462..46f71ab52220efb58ada224c79dc03608892f30c 100644 --- a/OpenFlipper/Core/Core.cc +++ b/OpenFlipper/Core/Core.cc @@ -743,7 +743,7 @@ Core::slotMouseEventIdentify( QMouseEvent* _event ) PluginFunctions::setActiveExaminer( examinerId ); // Do picking - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; if(PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_ANYTHING, _event->pos(), node_idx, target_idx, &hit_point)) { diff --git a/OpenFlipper/Documentation/DeveloperHelpSources/changelog.docu b/OpenFlipper/Documentation/DeveloperHelpSources/changelog.docu index 5095c98f089ade4470ec91475d86e7c84e82ff7d..0987ee9bf1d0aff8695820281a56b4c73163e8e1 100644 --- a/OpenFlipper/Documentation/DeveloperHelpSources/changelog.docu +++ b/OpenFlipper/Documentation/DeveloperHelpSources/changelog.docu @@ -2,6 +2,8 @@ - OpenFlipper 4.0 ( ?/?/? ) + - Breaking changes + - Picking functions use size_t instead of unsigned int now (Required to get rid of a lot of warnings during compilation) - Build System - Enable C++-11 by default - Drop support for Qt 4 diff --git a/OpenFlipper/OpenFlipper.cc b/OpenFlipper/OpenFlipper.cc index 8d3d9b86a0febf232e8087653acf154d047b9784..48b11b2aa0dae32005202d5fe0939c62398bf7ff 100644 --- a/OpenFlipper/OpenFlipper.cc +++ b/OpenFlipper/OpenFlipper.cc @@ -111,35 +111,64 @@ #ifdef WIN32 void attachConsole() - { - //try to attach the console of the parent process - if (AttachConsole(-1)) - { - //if the console was attached change stdinput and output - freopen("CONIN$", "r", stdin); - freopen("CONOUT$", "w", stdout); - freopen("CONOUT$", "w", stderr); - } - else - { - //create and attach a new console if needed -#ifndef NDEBUG - //always open a console in debug mode - AllocConsole(); - freopen("CONIN$", "r", stdin); - freopen("CONOUT$", "w", stdout); - freopen("CONOUT$", "w", stderr); - return; -#endif - if (OpenFlipper::Options::logToConsole()) - { - AllocConsole(); - freopen("CONIN$", "r", stdin); - freopen("CONOUT$", "w", stdout); - freopen("CONOUT$", "w", stderr); - } - } - } + { + //try to attach the console of the parent process + if (AttachConsole(-1)) + { + //if the console was attached change stdinput and output + FILE* check = freopen("CONIN$", "r", stdin); + if (check) { + std::cerr << "Error reopening stdin" << std::endl; + } + check = freopen("CONOUT$", "w", stdout); + if (check) { + std::cerr << "Error reopening stdout" << std::endl; + } + check = freopen("CONOUT$", "w", stderr); + if (check) { + std::cerr << "Error reopening stderr" << std::endl; + } + } + else + { + //create and attach a new console if needed + #ifndef NDEBUG + //always open a console in debug mode + AllocConsole(); + + FILE* check = freopen("CONIN$", "r", stdin); + if (check) { + std::cerr << "Error reopening stdin" << std::endl; + } + ckeck = freopen("CONOUT$", "w", stdout); + if (check) { + std::cerr << "Error reopening stdout" << std::endl; + } + check = freopen("CONOUT$", "w", stderr); + if (check) { + std::cerr << "Error reopening stderr" << std::endl; + } + return; + #endif + if (OpenFlipper::Options::logToConsole()) + { + AllocConsole(); + + FILE* check = freopen("CONIN$", "r", stdin); + if (check) { + std::cerr << "Error reopening stdin" << std::endl; + } + check = freopen("CONOUT$", "w", stdout); + if (check) { + std::cerr << "Error reopening stdout" << std::endl; + } + check = freopen("CONOUT$", "w", stderr); + if (check) { + std::cerr << "Error reopening stderr" << std::endl; + } + } + } + } #endif diff --git a/OpenFlipper/publicWidgets/objectSelectionWidget/objectPickDialog.cc b/OpenFlipper/publicWidgets/objectSelectionWidget/objectPickDialog.cc index 48399e077f03d3d23d5e89a22afb87a31618a1fd..e7a14a00d9f4c95dadb99eb42fef4ae3587331af 100644 --- a/OpenFlipper/publicWidgets/objectSelectionWidget/objectPickDialog.cc +++ b/OpenFlipper/publicWidgets/objectSelectionWidget/objectPickDialog.cc @@ -183,7 +183,7 @@ void ObjectPickDialog::activated(const QModelIndex & _index) void ObjectPickDialog::slotMouseEventClick(QMouseEvent * _event, bool /*_double*/) { - unsigned int nodeIdx, targetIdx; + size_t nodeIdx, targetIdx; if (viewer_->viewer()->pick(ACG::SceneGraph::PICK_ANYTHING, _event->pos(), nodeIdx, targetIdx)) diff --git a/OpenFlipper/widgets/coreWidget/ContextMenu.cc b/OpenFlipper/widgets/coreWidget/ContextMenu.cc index 9a0b1f180b88fc71a48751e134f3b1665df94abd..8db67c7b6f392974b6a3112131131d13357deeb1 100644 --- a/OpenFlipper/widgets/coreWidget/ContextMenu.cc +++ b/OpenFlipper/widgets/coreWidget/ContextMenu.cc @@ -679,7 +679,7 @@ void CoreWidget::updatePopupMenu(const QPoint& _point) { } context = BACKGROUNDCONTEXT; // Do picking in the gl area to find an object - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; BaseObjectData* object = 0; ACG::SceneGraph::BaseNode* node = 0; diff --git a/OpenFlipper/widgets/coreWidget/dragAndDrop.cc b/OpenFlipper/widgets/coreWidget/dragAndDrop.cc index 6550afc193187b36ad6a52bcf5859637fb20f5ce..55e4c3c260f31af97f1305edd5ffe2ad5afd27dc 100644 --- a/OpenFlipper/widgets/coreWidget/dragAndDrop.cc +++ b/OpenFlipper/widgets/coreWidget/dragAndDrop.cc @@ -100,7 +100,7 @@ void CoreWidget::startDrag ( QMouseEvent* _event ) int objectId = -1; // Do picking in the gl area to find an object - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; BaseObjectData* object; if ( PluginFunctions::scenegraphPick ( ACG::SceneGraph::PICK_ANYTHING, diff --git a/OpenFlipper/widgets/glWidget/QtBaseViewer.cc b/OpenFlipper/widgets/glWidget/QtBaseViewer.cc index 98129d27852b378e44f1ca9eca68ce1f220e140d..340bf497c2153e3347254afa43fce01dfecfd6b7 100644 --- a/OpenFlipper/widgets/glWidget/QtBaseViewer.cc +++ b/OpenFlipper/widgets/glWidget/QtBaseViewer.cc @@ -2431,8 +2431,8 @@ void glViewer::updateCursorPosition (QPointF _scenePos) ACG::Vec3d tmp; - unsigned int nodeIdx = 0; - unsigned int targetIdx = 0; + size_t nodeIdx = 0; + size_t targetIdx = 0; // ignore cursor if we are outside of our window diff --git a/OpenFlipper/widgets/glWidget/QtBaseViewer.hh b/OpenFlipper/widgets/glWidget/QtBaseViewer.hh index 7422bc2f977288e90f80421f47a2736d2e76d0c9..c291791b035ed8c60cd5925751daee34c7e678c0 100644 --- a/OpenFlipper/widgets/glWidget/QtBaseViewer.hh +++ b/OpenFlipper/widgets/glWidget/QtBaseViewer.hh @@ -794,10 +794,10 @@ private: * @return Successful? */ bool pick( ACG::SceneGraph::PickTarget _pickTarget, - const QPoint& _mousePos, - unsigned int& _nodeIdx, - unsigned int& _targetIdx, - ACG::Vec3d* _hitPointPtr=0 ); + const QPoint& _mousePos, + size_t& _nodeIdx, + size_t& _targetIdx, + ACG::Vec3d* _hitPointPtr=0 ); /** \brief Perform picking action n a whole region. * @@ -814,7 +814,7 @@ private: */ bool pick_region( ACG::SceneGraph::PickTarget _pickTarget, const QRegion& _region, - QList >& _list, + QList >& _list, QVector* _depths = 0, QVector* _points = 0); @@ -836,15 +836,15 @@ private: /// pick using colors int pickColor( ACG::SceneGraph::PickTarget _pickTarget, const QPoint& _mousePos, - unsigned int& _nodeIdx, - unsigned int& _targetIdx, + size_t& _nodeIdx, + size_t& _targetIdx, ACG::Vec3d* _hitPointPtr=0 ); /// pick from cache int pickFromCache( ACG::SceneGraph::PickTarget _pickTarget, const QPoint& _mousePos, - unsigned int& _nodeIdx, - unsigned int& _targetIdx, + size_t& _nodeIdx, + size_t& _targetIdx, ACG::Vec3d* _hitPointPtr=0 ); private: diff --git a/OpenFlipper/widgets/glWidget/QtBaseViewerFlyAnimation.cc b/OpenFlipper/widgets/glWidget/QtBaseViewerFlyAnimation.cc index 8fc6f8c2ade445c0c74cd20f6646d0a6068de923..00ea6827c7668d6363f1f4dd5e7e35a1f0812c6c 100644 --- a/OpenFlipper/widgets/glWidget/QtBaseViewerFlyAnimation.cc +++ b/OpenFlipper/widgets/glWidget/QtBaseViewerFlyAnimation.cc @@ -72,7 +72,7 @@ void glViewer::flyTo(const QPoint& _pos, bool _moveBack) { makeCurrent(); - unsigned int nodeIdx, targetIdx; + size_t nodeIdx, targetIdx; ACG::Vec3d hitPoint; if (pick( ACG::SceneGraph::PICK_ANYTHING, _pos, nodeIdx, targetIdx, &hitPoint)) diff --git a/OpenFlipper/widgets/glWidget/QtBaseViewerPicking.cc b/OpenFlipper/widgets/glWidget/QtBaseViewerPicking.cc index 804a3944eccbbfb01c47cada8ccc48aceeeae758..2bac932b3f628b92f54b38543a6caa39dd7defee 100644 --- a/OpenFlipper/widgets/glWidget/QtBaseViewerPicking.cc +++ b/OpenFlipper/widgets/glWidget/QtBaseViewerPicking.cc @@ -76,8 +76,8 @@ bool glViewer::pick( ACG::SceneGraph::PickTarget _pickTarget, const QPoint& _mousePos, - unsigned int& _nodeIdx, - unsigned int& _targetIdx, + size_t& _nodeIdx, + size_t& _targetIdx, ACG::Vec3d* _hitPointPtr ) { if (sceneGraphRoot_) @@ -106,8 +106,8 @@ bool glViewer::pick( ACG::SceneGraph::PickTarget _pickTarget, int glViewer::pickColor( ACG::SceneGraph::PickTarget _pickTarget, const QPoint& _mousePos, - unsigned int& _nodeIdx, - unsigned int& _targetIdx, + size_t& _nodeIdx, + size_t& _targetIdx, ACG::Vec3d* _hitPointPtr ) { GLint w = glWidth(), @@ -306,8 +306,8 @@ int glViewer::pickColor( ACG::SceneGraph::PickTarget _pickTarget, int glViewer::pickFromCache( ACG::SceneGraph::PickTarget _pickTarget, const QPoint& _mousePos, - unsigned int& _nodeIdx, - unsigned int& _targetIdx, + size_t& _nodeIdx, + size_t& _targetIdx, ACG::Vec3d* _hitPointPtr ) { // do we need an update? @@ -416,7 +416,7 @@ int glViewer::pickFromCache( ACG::SceneGraph::PickTarget _pickTarget, bool glViewer::pick_region( ACG::SceneGraph::PickTarget _pickTarget, const QRegion& _region, - QList >& _list, + QList >& _list, QVector* _depths, QVector* _points) { @@ -565,7 +565,7 @@ bool glViewer::pick_region( ACG::SceneGraph::PickTarget _pickTarg if (rv.size () < 2) continue; - QPair curr(rv[1], rv[0]); + QPair curr(rv[1], rv[0]); // added a new (targetidx/nodeidx) pair if( !_list.contains(curr)) diff --git a/Plugin-Components/ComponentsPlugin.cc b/Plugin-Components/ComponentsPlugin.cc index 1d5047f866f7f962d7bffa94e252fceca4c4d30d..59d50b195d1f0da4b7bb33e94c32f3b9d5c97206 100644 --- a/Plugin-Components/ComponentsPlugin.cc +++ b/Plugin-Components/ComponentsPlugin.cc @@ -166,7 +166,7 @@ void ComponentsPlugin::splitComponents(QMouseEvent * _event) { if (_event->type() == QEvent::MouseButtonPress ) { - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d* sourcePoint3D = 0; if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, @@ -193,7 +193,7 @@ void ComponentsPlugin::biggestComponent(QMouseEvent* _event) { if (_event->type() == QEvent::MouseButtonPress ) { - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d* sourcePoint3D = 0; if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, diff --git a/Plugin-InfoMeshObject/MeshObjectInfoPlugin.cc b/Plugin-InfoMeshObject/MeshObjectInfoPlugin.cc index 5372f04550c9f7a6f08e13157ecf9b9ed067ffea..2c5b6c1ed65dcda97cb87cbf83e9588d02f8020a 100644 --- a/Plugin-InfoMeshObject/MeshObjectInfoPlugin.cc +++ b/Plugin-InfoMeshObject/MeshObjectInfoPlugin.cc @@ -697,7 +697,7 @@ InfoMeshObjectPlugin:: ACG::SceneGraph::PickTarget target = ACG::SceneGraph::PICK_FACE; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; if (info_->isHidden()) diff --git a/Plugin-InfoSkeleton/SkeletonObjectInfoPlugin.cc b/Plugin-InfoSkeleton/SkeletonObjectInfoPlugin.cc index 6104484ba89996c89264c8fdda7812878254bca1..46e5c7f07e605ae7692f403275d765d862a45e9e 100644 --- a/Plugin-InfoSkeleton/SkeletonObjectInfoPlugin.cc +++ b/Plugin-InfoSkeleton/SkeletonObjectInfoPlugin.cc @@ -211,7 +211,7 @@ void InfoSkeletonObjectPlugin::slotInformationRequested(const QPoint _clickedPoi ACG::SceneGraph::PickTarget target = ACG::SceneGraph::PICK_ANYTHING; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; if (PluginFunctions::scenegraphPick(target, _clickedPoint, node_idx, target_idx, &hit_point)) { diff --git a/Plugin-MaterialPicker/MaterialPicker.cc b/Plugin-MaterialPicker/MaterialPicker.cc index 1e050bcadb8a9d14f7c3c44b3d165a2abf5763c3..08dcba76042f66cb34b521120e11fa62d781a057 100644 --- a/Plugin-MaterialPicker/MaterialPicker.cc +++ b/Plugin-MaterialPicker/MaterialPicker.cc @@ -269,7 +269,7 @@ void MaterialPicker::slotMouseEvent(QMouseEvent* _event) { return; if (_event->type() == QEvent::MouseButtonPress) { - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; OpenMesh::Vec3d hitPoint; // Get picked object's identifier by picking in scenegraph diff --git a/Plugin-Move/MovePlugin.cc b/Plugin-Move/MovePlugin.cc index d2f0b009c726a368655cbf745e505d015679b719..6f7e3ed518890b62c1c6fe55c9040add6675abfd 100644 --- a/Plugin-Move/MovePlugin.cc +++ b/Plugin-Move/MovePlugin.cc @@ -863,7 +863,7 @@ void MovePlugin::ManipulatorPositionChanged(QtTranslationManipulatorNode* _node * @param _snap Snap manipulator to nearest geometry primitive? */ void MovePlugin::placeManip(QMouseEvent * _event, bool _snap) { - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; OpenMesh::Vec3d hitPoint; BaseObjectData* object; diff --git a/Plugin-PolyLine/PolyLinePlugin.cc b/Plugin-PolyLine/PolyLinePlugin.cc index e4790904a9995c466cad38c6044e058ad41a15fd..8e1399cd4da6a3514ea691bb7cbca43afd037449 100644 --- a/Plugin-PolyLine/PolyLinePlugin.cc +++ b/Plugin-PolyLine/PolyLinePlugin.cc @@ -960,22 +960,23 @@ PolyLinePlugin:: me_insert( QMouseEvent* _event ) { if (_event->type() == QEvent::MouseMove) { + if (create_point_ref_) { - // Pick position - unsigned int node_idx, target_idx; - ACG::Vec3d hit_point; - if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(), node_idx, target_idx, &hit_point)) { - *create_point_ref_ = (PolyLine::Point) hit_point; - - // update - emit updatedObject(cur_insert_id_, UPDATE_GEOMETRY); - } + // Pick position + size_t node_idx, target_idx; + ACG::Vec3d hit_point; + if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(), node_idx, target_idx, &hit_point)) { + *create_point_ref_ = (PolyLine::Point) hit_point; + + // update + emit updatedObject(cur_insert_id_, UPDATE_GEOMETRY); + } } return; } // Pick position - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(), node_idx, target_idx, &hit_point)) { @@ -1363,7 +1364,7 @@ me_delete( QMouseEvent* _event ) // MousePress ? if (_event->type() == QEvent::MouseButtonPress) { - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; // pick if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_ANYTHING, _event->pos(), node_idx, target_idx, &hit_point)) { @@ -1386,19 +1387,19 @@ me_delete( QMouseEvent* _event ) namespace { -bool me_GetMeshHit(QMouseEvent* _event, ACG::SceneGraph::GlutPrimitiveNode* moveCircle_SelNode_, ACG::Vec3d& _hit_point, unsigned int& _node_idx, unsigned int& _targetIdx) +bool me_GetMeshHit(QMouseEvent* _event, ACG::SceneGraph::GlutPrimitiveNode* moveCircle_SelNode_, ACG::Vec3d& _hit_point, size_t& _node_idx, size_t& _targetIdx) { - unsigned int ndx; - if(moveCircle_SelNode_) - moveCircle_SelNode_->enablePicking(false); - bool hasHit = PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(), ndx, _targetIdx, &_hit_point); - if(moveCircle_SelNode_) - moveCircle_SelNode_->enablePicking(true); - BaseObjectData* obj; - //if there is no current mesh use the newly found - if(hasHit && PluginFunctions::getPickedObject(ndx, obj) && _node_idx == std::numeric_limits::max()) - _node_idx = obj->id(); - return hasHit; + size_t ndx; + if(moveCircle_SelNode_) + moveCircle_SelNode_->enablePicking(false); + bool hasHit = PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(), ndx, _targetIdx, &_hit_point); + if(moveCircle_SelNode_) + moveCircle_SelNode_->enablePicking(true); + BaseObjectData* obj; + //if there is no current mesh use the newly found + if(hasHit && PluginFunctions::getPickedObject(ndx, obj) && _node_idx == std::numeric_limits::max()) + _node_idx = obj->id(); + return hasHit; } void me_UpdateCircleData(ACG::Vec3d _hit_point, ACG::Vec3d _onPlane, ACG::Vec3d _nor, ACG::SceneGraph::GlutPrimitiveNode* _moveCircle_SelNode_, PolyLineCircleData* _lineData, bool _isShift) @@ -1447,7 +1448,7 @@ me_move( QMouseEvent* _event ) // MousePress ? -> get reference point if (_event->type() == QEvent::MouseButtonPress) { - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; // this is for picking the handles on a circle or spline if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_ANYTHING, _event->pos(), node_idx, target_idx, &hit_point)) { @@ -1497,7 +1498,7 @@ me_move( QMouseEvent* _event ) return; PolyLineCircleData* lineData = dynamic_cast(lineObject->objectData(CIRCLE_DATA)); ACG::Vec3d hit_point; - unsigned int target_idx; + size_t target_idx; bool hasHit = me_GetMeshHit(_event, moveCircle_SelNode_, hit_point, lineData->circleMeshIndex_, target_idx); if(lineData->circleMeshIndex_ == std::numeric_limits::max()) return; if(!moveCircle_IsLocked && hasHit) { @@ -1546,7 +1547,7 @@ me_move( QMouseEvent* _event ) return; PolyLineBezierSplineData* lineData = dynamic_cast(lineObject->objectData(BEZSPLINE_DATA)); ACG::Vec3d hit_point; - unsigned int target_idx; + size_t target_idx; bool hasHit = me_GetMeshHit(_event, moveBezSpline_SelNode_, hit_point, lineData->meshIndex_, target_idx); if(lineData->meshIndex_ == std::numeric_limits::max()) return; @@ -1607,8 +1608,8 @@ me_move( QMouseEvent* _event ) updatePolyBezierSpline(lineObject, tool_->sb_SplineSegNum->value()); } else if (move_point_ref_ != 0) { - ACG::Vec3d hit_point; - unsigned int node_idx, target_idx; + ACG::Vec3d hit_point; + size_t node_idx, target_idx; if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(), node_idx, target_idx, &hit_point)) { (*move_point_ref_) = (PolyLine::Point) hit_point; // update @@ -1650,7 +1651,7 @@ me_split( QMouseEvent* _event ) // release old references move_point_ref_ = 0; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; // pick if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_VERTEX, _event->pos(), node_idx, target_idx, &hit_point)) { @@ -1722,7 +1723,7 @@ me_split( QMouseEvent* _event ) if (_event->type() == QEvent::MouseMove) if (move_point_ref_ != 0) { - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; // pick if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(), node_idx, target_idx, &hit_point)) { @@ -1759,7 +1760,7 @@ me_merge( QMouseEvent* _event ) move_point_ref_ = 0; cur_merge_id_ = -1; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; // pick if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_VERTEX, _event->pos(), node_idx, target_idx, &hit_point)) { @@ -1796,7 +1797,7 @@ me_merge( QMouseEvent* _event ) // Move ? -> move reference point if (_event->type() == QEvent::MouseMove && cur_merge_id_ != -1) if (move_point_ref_ != 0) { - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; // pick if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(), node_idx, target_idx, &hit_point)) { @@ -1828,7 +1829,7 @@ me_merge( QMouseEvent* _event ) move_point_ref_ = 0; } - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; // pick @@ -1978,7 +1979,7 @@ me_smart_move( QMouseEvent* _event ) // MousePress ? -> select vertex and start timer if (_event->type() == QEvent::MouseButtonPress) { - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; // pick @@ -2156,7 +2157,7 @@ pick_triangle_mesh( QPoint mPos, _fh = TriMesh::FaceHandle (-1); _vh = TriMesh::VertexHandle(-1); - unsigned int target_idx = 0, node_idx = 0; + size_t target_idx = 0, node_idx = 0; ACG::Vec3d hit_point; @@ -2225,7 +2226,7 @@ me_copyPasteMouse(QMouseEvent* _event) copyPaste_ObjectId_ = copyPaste_ActionType_ - 1; } //determine the world pos - unsigned int target_idx = 0, node_idx = 0; + size_t target_idx = 0, node_idx = 0; ACG::Vec3d hit_point; if( PluginFunctions::scenegraphPick( ACG::SceneGraph::PICK_ANYTHING, _event->pos(), node_idx, target_idx, &hit_point ) ) { if(copyPaste_ActionType_ == 1) {//duplicate @@ -2296,7 +2297,7 @@ slot_duplicate() if(copyPaste_ObjectId_ == -1 || !PluginFunctions::getObject(copyPaste_ObjectId_, obj)) return; //set mode for mouse move event - unsigned int target_idx = 0, node_idx = 0; + size_t target_idx = 0, node_idx = 0; ACG::Vec3d hit_point; //determine the world coordinate of the mouse QPoint mPos = copyPaste_LastMouse; diff --git a/Plugin-PropertyVis/OpenMesh/OMPropertyModelT.cc b/Plugin-PropertyVis/OpenMesh/OMPropertyModelT.cc index 7b2d805b0b258310a3ca5cef24f5cf4c16ce93ba..1e67b681bb329912c10a3e620ed960f89635e45f 100644 --- a/Plugin-PropertyVis/OpenMesh/OMPropertyModelT.cc +++ b/Plugin-PropertyVis/OpenMesh/OMPropertyModelT.cc @@ -382,21 +382,21 @@ void OMPropertyModel::mouseEvent(QMouseEvent* _event) if (_event->type() == QEvent::MouseButtonPress) { - unsigned int node_idx, face_idx; - ACG::Vec3d hit_point; + size_t node_idx, face_idx; + ACG::Vec3d hit_point; - if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(),node_idx, face_idx, &hit_point)) { - BaseObjectData* object; - PluginFunctions::getPickedObject(node_idx, object); + if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(),node_idx, face_idx, &hit_point)) { + BaseObjectData* object; + PluginFunctions::getPickedObject(node_idx, object); - if (object->id() == objectID_) - { - OMPropertyVisualizer* viz = dynamic_cast*>(propertyVisualizers[currentlySelectedIndices.first().row()] ); - unsigned int primitiveId = viz->getClosestPrimitiveId(face_idx, hit_point); - mPickWidget.pickedHandle->setText(tr("%1").arg(primitiveId)); - mPickWidget.pickedValue->setText(viz->getPropertyText(primitiveId)); - } + if (object->id() == objectID_) + { + OMPropertyVisualizer* viz = dynamic_cast*>(propertyVisualizers[currentlySelectedIndices.first().row()] ); + unsigned int primitiveId = viz->getClosestPrimitiveId(face_idx, hit_point); + mPickWidget.pickedHandle->setText(tr("%1").arg(primitiveId)); + mPickWidget.pickedValue->setText(viz->getPropertyText(primitiveId)); } + } } } diff --git a/Plugin-PropertyVis/OpenVolumeMesh/OVMPropertyModelT.cc b/Plugin-PropertyVis/OpenVolumeMesh/OVMPropertyModelT.cc index c24c2eae435922207b3a0985e0ca0f7db7146f14..e4127e2cb2777b574c493522040e488e557d6a17 100644 --- a/Plugin-PropertyVis/OpenVolumeMesh/OVMPropertyModelT.cc +++ b/Plugin-PropertyVis/OpenVolumeMesh/OVMPropertyModelT.cc @@ -182,12 +182,12 @@ void OVMPropertyModel::mouseEvent(QMouseEvent* _event) if (_event->type() == QEvent::MouseButtonPress) { - unsigned int node_idx; + size_t node_idx; ACG::Vec3d hit_point; OVMPropertyVisualizer* viz = dynamic_cast*>(propertyVisualizers[currentlySelectedIndices.first().row()]); - unsigned int entityId = 0; + size_t entityId = 0; ACG::SceneGraph::PickTarget pickTarget; if (viz->getPropertyInfo().isCellProp()) diff --git a/Plugin-Ruler/RulerPlugin.cc b/Plugin-Ruler/RulerPlugin.cc index e52e029de5f44830ea823988f33d295a8259578d..fab905ff9cb729ad4b0374334cac36f474880f89 100644 --- a/Plugin-Ruler/RulerPlugin.cc +++ b/Plugin-Ruler/RulerPlugin.cc @@ -106,7 +106,7 @@ void RulerPlugin::slotMouseEvent(QMouseEvent* _event) //set one of the points, depending on the hit state (first, second or modifying) if (_event->type() == QEvent::MouseButtonRelease ) { - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; OpenMesh::Vec3d hitPoint; // Get picked object's identifier by picking in scenegraph @@ -165,7 +165,7 @@ void RulerPlugin::slotMouseEvent(QMouseEvent* _event) { //decides which point is the nearest one, so //it can be dragged - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; OpenMesh::Vec3d hitPoint; // Get picked object's identifier by picking in scenegraph @@ -181,7 +181,7 @@ void RulerPlugin::slotMouseEvent(QMouseEvent* _event) else if (_event->type() == QEvent::MouseMove && dragModeActive()) {//mouse moved and drag mode is enabled - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; OpenMesh::Vec3d hitPoint; ACG::Vec3d hitPoints[2]; std::copy(currentRuler_->points(),currentRuler_->points()+2,hitPoints); diff --git a/Plugin-SkeletonEditing/SkeletonEditingPlugin.cc b/Plugin-SkeletonEditing/SkeletonEditingPlugin.cc index 4decf3446865264b204db0961bdb5654cc0fe0fc..726270824daf9a3864c5fdfeaf3086835a56cce9 100644 --- a/Plugin-SkeletonEditing/SkeletonEditingPlugin.cc +++ b/Plugin-SkeletonEditing/SkeletonEditingPlugin.cc @@ -298,7 +298,7 @@ bool SkeletonEditingPlugin::canModify(QMouseEvent* _event) return true; // try to select a joint from which the insertion should be started - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hitPoint; BaseObjectData* object; @@ -537,7 +537,7 @@ void SkeletonEditingPlugin::slotRotateManipulator(bool _toggled) * @param _event mouseEvent that occured */ void SkeletonEditingPlugin::placeManip(QMouseEvent * _event) { - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; OpenMesh::Vec3d hitPoint; BaseObjectData* object; @@ -902,7 +902,7 @@ void SkeletonEditingPlugin::deleteJoint(QMouseEvent* _event) { if ( (_event->type() == QEvent::MouseButtonPress) || (_event->type() == QEvent::MouseButtonRelease) ){ // only select the joint on mousePress - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hitPoint; BaseObjectData* object; @@ -994,7 +994,7 @@ void SkeletonEditingPlugin::splitJoint(QMouseEvent* _event) return; // try to select a joint from which the insertion should be started - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hitPoint; BaseObjectData* object; @@ -1039,7 +1039,7 @@ void SkeletonEditingPlugin::insertJoint(QMouseEvent* _event) // try to select a joint from which the insertion should be started // - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hitPoint; BaseObjectData* object; @@ -1086,7 +1086,7 @@ void SkeletonEditingPlugin::insertJoint(QMouseEvent* _event) } // add a new skeleton at this position - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d lastHitPoint(0.0, 0.0, 0.0); // first try to pick something @@ -1173,7 +1173,7 @@ void SkeletonEditingPlugin::insertJoint(QMouseEvent* _event) // CASE 1 : this is a release on a joint from which the insertion should be started if ( !jointPreview_ ){ // in - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hitPoint; BaseObjectData* object; @@ -1377,7 +1377,7 @@ void SkeletonEditingPlugin::selectJoint(QMouseEvent* _event) if ( _event->type() == QEvent::MouseButtonRelease ){ - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hitPoint; BaseObjectData* object; diff --git a/Plugin-Topology/TopologyPlugin.cc b/Plugin-Topology/TopologyPlugin.cc index 4569152c1c19f2fe067a393f9bab412dc53fd17d..a5fa6b09970133a4132188c8a91edd8e6ce839bc 100644 --- a/Plugin-Topology/TopologyPlugin.cc +++ b/Plugin-Topology/TopologyPlugin.cc @@ -249,7 +249,7 @@ void TopologyPlugin::add_face(QMouseEvent* _event) { if (( _event->type() != QEvent::MouseButtonPress) && (_event->type() != QEvent::MouseButtonDblClick)) return; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(),node_idx, target_idx, &hit_point)) { @@ -489,7 +489,7 @@ void TopologyPlugin::split_face(QMouseEvent* _event) { if ( _event->type() != QEvent::MouseButtonPress ) return; - unsigned int target_idx; + size_t target_idx; ACG::Vec3d hit_point; BaseObjectData* object = 0; @@ -548,7 +548,7 @@ void TopologyPlugin::delete_face(QMouseEvent* _event) { if ( _event->type() != QEvent::MouseButtonPress ) return; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(),node_idx, target_idx, &hit_point)) { @@ -597,7 +597,7 @@ void TopologyPlugin::flip_edge(QMouseEvent* _event) { if ( _event->type() != QEvent::MouseButtonPress ) return; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(),node_idx, target_idx, &hit_point)) { @@ -662,7 +662,7 @@ void TopologyPlugin::collapse_edge(QMouseEvent* _event) { if ( _event->type() != QEvent::MouseButtonPress ) return; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(),node_idx, target_idx, &hit_point)) { @@ -775,7 +775,7 @@ void TopologyPlugin::split_edge(QMouseEvent* _event) { if ( _event->type() != QEvent::MouseButtonPress ) return; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(),node_idx, target_idx, &hit_point)) { diff --git a/Plugin-VSI/types/objectId/objectPickDialog.cc b/Plugin-VSI/types/objectId/objectPickDialog.cc index 7e2bf98020471f0163892ba367b44b16dc1033e6..18344e557809b095e41a7f9d93af9f260e2f0cc4 100644 --- a/Plugin-VSI/types/objectId/objectPickDialog.cc +++ b/Plugin-VSI/types/objectId/objectPickDialog.cc @@ -184,7 +184,7 @@ void ObjectPickDialog::activated(const QModelIndex & _index) void ObjectPickDialog::slotMouseEventClick(QMouseEvent * _event, bool /*_double*/) { - unsigned int nodeIdx, targetIdx; + size_t nodeIdx, targetIdx; if (viewer_->viewer()->pick(ACG::SceneGraph::PICK_ANYTHING, _event->pos(), nodeIdx, targetIdx)) { diff --git a/PluginCollection-Selection/Plugin-SelectionBSplineCurve/BSplineCurveSelectionPlugin.cc b/PluginCollection-Selection/Plugin-SelectionBSplineCurve/BSplineCurveSelectionPlugin.cc index 2c0a428dc3465162a68fb00331f4729b9df01ca8..1c9d63336e0a6a5d56bb8d76b0a258b141993c24 100644 --- a/PluginCollection-Selection/Plugin-SelectionBSplineCurve/BSplineCurveSelectionPlugin.cc +++ b/PluginCollection-Selection/Plugin-SelectionBSplineCurve/BSplineCurveSelectionPlugin.cc @@ -299,7 +299,7 @@ void BSplineCurveSelectionPlugin::slotToggleSelection(QMouseEvent* _event, Selec // Return if none of the currently active types is handled by this plugin if((_currentType & allSupportedTypes_) == 0) return; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; BaseObjectData* object = 0; diff --git a/PluginCollection-Selection/Plugin-SelectionBSplineSurface/BSplineSurfaceSelectionPlugin.cc b/PluginCollection-Selection/Plugin-SelectionBSplineSurface/BSplineSurfaceSelectionPlugin.cc index fdcdb9c5fe813db1808a483c3fa954c272134731..7c7bf25aa96a8181c7ebcd9ad00197bd157bdf30 100644 --- a/PluginCollection-Selection/Plugin-SelectionBSplineSurface/BSplineSurfaceSelectionPlugin.cc +++ b/PluginCollection-Selection/Plugin-SelectionBSplineSurface/BSplineSurfaceSelectionPlugin.cc @@ -321,7 +321,7 @@ void BSplineSurfaceSelectionPlugin::slotToggleSelection(QMouseEvent* _event, Sel if (_currentType & controlPointType_) { - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_VERTEX, _event->pos(), node_idx, target_idx, &hit_point)) { @@ -358,7 +358,7 @@ void BSplineSurfaceSelectionPlugin::slotToggleSelection(QMouseEvent* _event, Sel if (_currentType & knotType_) { - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_SPLINE, _event->pos(),node_idx, target_idx, &hit_point)) { diff --git a/PluginCollection-Selection/Plugin-SelectionBase/SelectionBasePlugin.cc b/PluginCollection-Selection/Plugin-SelectionBase/SelectionBasePlugin.cc index 494231bfb5a650c1a1380b891ccbc941e0eb5b3f..97c6b43a68217eef54984480dd572b1b6c75c06d 100644 --- a/PluginCollection-Selection/Plugin-SelectionBase/SelectionBasePlugin.cc +++ b/PluginCollection-Selection/Plugin-SelectionBase/SelectionBasePlugin.cc @@ -1278,7 +1278,7 @@ void SelectionBasePlugin::slotMouseLassoSelection(QMouseEvent* _event) { // Ignore context menu for lasso selection if (_event->button() == Qt::RightButton) return; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; int y = PluginFunctions::viewerProperties().glState().context_height() - _event->pos().y(); @@ -1345,7 +1345,7 @@ void SelectionBasePlugin::slotMouseVolumeLassoSelection(QMouseEvent* _event) { // Ignore context menu for volume lasso selection if (_event->button() == Qt::RightButton) return; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; int y = PluginFunctions::viewerProperties().glState().context_height() - _event->pos().y(); @@ -1421,7 +1421,7 @@ void SelectionBasePlugin::slotMouseSphereSelection(QMouseEvent* _event) { if (_event->button() == Qt::RightButton) return; // Do rendering of mouse tool... - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; // Hide sphere node in order to avoid self picking diff --git a/PluginCollection-Selection/Plugin-SelectionMeshObject/MeshObjectSelectionPlugin.cc b/PluginCollection-Selection/Plugin-SelectionMeshObject/MeshObjectSelectionPlugin.cc index 07e67fe878c253b944b57e3386eb0dedfe4f9ff4..4c20c6238e377a1653665e1945f7ae70fbdb2d78 100644 --- a/PluginCollection-Selection/Plugin-SelectionMeshObject/MeshObjectSelectionPlugin.cc +++ b/PluginCollection-Selection/Plugin-SelectionMeshObject/MeshObjectSelectionPlugin.cc @@ -1225,7 +1225,7 @@ void MeshObjectSelectionPlugin::slotToggleSelection(QMouseEvent* _event, Selecti // Return if none of the currently active types is handled by this plugin if((_currentType & allSupportedTypes_) == 0) return; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; // First of all, pick anything to find all possible objects @@ -1321,7 +1321,7 @@ void MeshObjectSelectionPlugin::slotSphereSelection(QMouseEvent* _event, double // Return if none of the currently active types is handled by this plugin if((_currentType & allSupportedTypes_) == 0) return; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; if (PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(), node_idx, target_idx, &hit_point)) { @@ -1348,7 +1348,7 @@ void MeshObjectSelectionPlugin::slotClosestBoundarySelection(QMouseEvent* _event // Return if none of the currently active types is handled by this plugin if((_currentType & allSupportedTypes_) == 0) return; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; if(PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos() ,node_idx, target_idx, &hit_point)) { @@ -1388,7 +1388,7 @@ void MeshObjectSelectionPlugin::slotFloodFillSelection(QMouseEvent* _event, doub // Return if none of the currently active types is handled by this plugin if((_currentType & allSupportedTypes_) == 0) return; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; // pick Anything to find all possible objects @@ -1447,7 +1447,7 @@ void MeshObjectSelectionPlugin::slotComponentsSelection(QMouseEvent* _event, Sel // Return if none of the currently active types is handled by this plugin if((_currentType & allSupportedTypes_) == 0) return; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; // First of all, pick anything to find all possible objects @@ -1860,7 +1860,7 @@ void MeshObjectSelectionPlugin::lassoSelect(QRegion& _region, bool _deselection) { // - QList > list; + QList > list; if(_primitiveType & vertexType_) { PluginFunctions::scenegraphRegionPick(ACG::SceneGraph::PICK_FRONT_VERTEX, _region, list); diff --git a/PluginCollection-Selection/Plugin-SelectionObject/ObjectSelectionPlugin.cc b/PluginCollection-Selection/Plugin-SelectionObject/ObjectSelectionPlugin.cc index 13d4445115e118a182af541e39886eeff6479120..60415ff993ecdf5653a6742f7aa29696888456bb 100644 --- a/PluginCollection-Selection/Plugin-SelectionObject/ObjectSelectionPlugin.cc +++ b/PluginCollection-Selection/Plugin-SelectionObject/ObjectSelectionPlugin.cc @@ -175,8 +175,8 @@ void ObjectSelectionPlugin::slotToggleSelection(QMouseEvent* _event, SelectionIn // Return if mouse event is not a left-button click if(_event->button() != Qt::LeftButton) return; - unsigned int node_idx = 0; - unsigned int target_idx = 0; + size_t node_idx = 0; + size_t target_idx = 0; ACG::Vec3d hit_point; BaseObjectData* object = 0; diff --git a/PluginCollection-Selection/Plugin-SelectionPolyLine/PolyLineSelectionPlugin.cc b/PluginCollection-Selection/Plugin-SelectionPolyLine/PolyLineSelectionPlugin.cc index 9c15d1894cf9cfa39ba0828e775c78fac7334d54..730de8619851ea9394e788fb06a36f9d79edd380 100644 --- a/PluginCollection-Selection/Plugin-SelectionPolyLine/PolyLineSelectionPlugin.cc +++ b/PluginCollection-Selection/Plugin-SelectionPolyLine/PolyLineSelectionPlugin.cc @@ -278,7 +278,7 @@ void PolyLineSelectionPlugin::slotToggleSelection(QMouseEvent* _event, Selection // Return if mouse event is not a left-button click if(_event->button() != Qt::LeftButton) return; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; BaseObjectData* object = 0; diff --git a/PluginCollection-Selection/Plugin-SelectionSplatCloudObject/SplatCloudObjectSelectionPlugin.cc b/PluginCollection-Selection/Plugin-SelectionSplatCloudObject/SplatCloudObjectSelectionPlugin.cc index b10b885e00aada04a2745badf77b967effd21c09..825885e0d12fa2f4e6661f0a845c8e8c65c668ca 100644 --- a/PluginCollection-Selection/Plugin-SelectionSplatCloudObject/SplatCloudObjectSelectionPlugin.cc +++ b/PluginCollection-Selection/Plugin-SelectionSplatCloudObject/SplatCloudObjectSelectionPlugin.cc @@ -281,7 +281,7 @@ void SplatCloudObjectSelectionPlugin::slotToggleSelection( QMouseEvent *_event, if( (_currentType & allSupportedTypes_) == 0 ) return; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; // First of all, pick anything to find all possible objects @@ -319,7 +319,7 @@ void SplatCloudObjectSelectionPlugin::slotSphereSelection( QMouseEvent *_event, if( (_currentType & allSupportedTypes_) == 0 ) return; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; if( PluginFunctions::scenegraphPick( ACG::SceneGraph::PICK_VERTEX, _event->pos(), node_idx, target_idx, &hit_point) ) @@ -638,7 +638,7 @@ void SplatCloudObjectSelectionPlugin::slotKeyShortcutEvent( int _key, Qt::Keyboa void SplatCloudObjectSelectionPlugin::lassoSelect( QRegion &_region, PrimitiveType _primitiveType, bool _deselection ) { // - QList< QPair > list; + QList< QPair > list; if( _primitiveType & vertexType_) { diff --git a/PluginCollection-Selection/Plugin-SelectionVolumeMesh/VolumeMeshSelectionPlugin.cc b/PluginCollection-Selection/Plugin-SelectionVolumeMesh/VolumeMeshSelectionPlugin.cc index c8247576021cbc3f94ca8ec2a1b74519c123a152..30047d14bdae10abbdbce7e42639e5b6afc8972e 100644 --- a/PluginCollection-Selection/Plugin-SelectionVolumeMesh/VolumeMeshSelectionPlugin.cc +++ b/PluginCollection-Selection/Plugin-SelectionVolumeMesh/VolumeMeshSelectionPlugin.cc @@ -360,7 +360,7 @@ void VolumeMeshSelectionPlugin::slotToggleSelection(QMouseEvent* _event, if(_event->button() != Qt::LeftButton) return; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; BaseObjectData* object = 0; @@ -494,7 +494,7 @@ void VolumeMeshSelectionPlugin::slotFloodFillSelection(QMouseEvent* _event, if ((_currentType & floodFillSupportedTypes_) == 0) return; - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; ACG::Vec3d hit_point; // pick Anything to find all possible objects @@ -619,7 +619,7 @@ void VolumeMeshSelectionPlugin::slotCustomSelection(QMouseEvent *_event, Primiti BaseObjectData* object = 0; // Perform picking - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; bool successfullyPicked = PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(), node_idx, target_idx, &hit_point) && PluginFunctions::getPickedObject(node_idx, object); @@ -667,7 +667,7 @@ void VolumeMeshSelectionPlugin::slotCustomSelection(QMouseEvent *_event, Primiti ACG::Vec3d hit_point; // Perform picking - unsigned int node_idx, target_idx; + size_t node_idx, target_idx; bool successfullyPicked = PluginFunctions::scenegraphPick(ACG::SceneGraph::PICK_FACE, _event->pos(), node_idx, target_idx, &hit_point) && PluginFunctions::getPickedObject(node_idx, object); diff --git a/PluginCollection-TypePlugins/Plugin-TypeLight/TypeLight.cc b/PluginCollection-TypePlugins/Plugin-TypeLight/TypeLight.cc index b3d3fe9031bc9da73462a37a68dd2948ce807467..0712e624d9817835f8479cc393e5f904fefe03e0 100644 --- a/PluginCollection-TypePlugins/Plugin-TypeLight/TypeLight.cc +++ b/PluginCollection-TypePlugins/Plugin-TypeLight/TypeLight.cc @@ -523,8 +523,8 @@ void TypeLightPlugin::slotMouseEventLight(QMouseEvent* _event) { QPoint p(_event->x(), _event->y()); - unsigned int id = 0; - unsigned int t = 0; + size_t id = 0; + size_t t = 0; ACG::Vec3d v; PluginFunctions::scenegraphPick(PluginFunctions::activeExaminer(), ACG::SceneGraph::PICK_ANYTHING, p, id, t, &v);