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

Store normal deviation on reference Mesh refs #360

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13573 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 77a5c619
......@@ -159,6 +159,12 @@ void MeshComparePlugin::compare(int _sourceId,int _targetId) {
refMesh->add_property(vertexDistanceProp,"MeshCompare_VertexDistance");
}
// Generate a property, where we store the information
OpenMesh::VPropHandleT<double> normalDeviationProp;
if ( ! refMesh->get_property_handle(normalDeviationProp,"MeshCompare_NormalDeviation") ) {
refMesh->add_property(normalDeviationProp,"MeshCompare_NormalDeviation");
}
// Get a bsp for the target, as we will project the reference mesh onto the target mesh.
// It will be build automatically at this point.
......@@ -216,6 +222,9 @@ void MeshComparePlugin::compare(int _sourceId,int _targetId) {
normalDeviation = 180.0 / M_PI * acos(normalDeviation);
// Set it to the reference mesh
refMesh->property(normalDeviationProp,v_it) = normalDeviation;
if (normalDeviation > maxNormalDeviation)
maxNormalDeviation = normalDeviation;
......
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