Commit 42750e34 authored by Jan Möbius's avatar Jan Möbius

Changed function parameters for picking from using unsigned int to size_t. Breaking Change!

parent 4c8a8156
......@@ -382,21 +382,21 @@ void OMPropertyModel<MeshT>::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<MeshT>* viz = dynamic_cast<OMPropertyVisualizer<MeshT>*>(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<MeshT>* viz = dynamic_cast<OMPropertyVisualizer<MeshT>*>(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));
}
}
}
}
......
......@@ -182,12 +182,12 @@ void OVMPropertyModel<MeshT>::mouseEvent(QMouseEvent* _event)
if (_event->type() == QEvent::MouseButtonPress)
{
unsigned int node_idx;
size_t node_idx;
ACG::Vec3d hit_point;
OVMPropertyVisualizer<MeshT>* viz = dynamic_cast<OVMPropertyVisualizer<MeshT>*>(propertyVisualizers[currentlySelectedIndices.first().row()]);
unsigned int entityId = 0;
size_t entityId = 0;
ACG::SceneGraph::PickTarget pickTarget;
if (viz->getPropertyInfo().isCellProp())
......
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