+ rename method 'transform' to 'tramsformGeometry' for the classes PropertyNormalList and PropertyCurvatureList

+ make transformGeometry method ready for undo/redo
This commit is contained in:
wmayer
2016-01-22 13:18:24 +01:00
parent 7bba2ee9aa
commit 27fbccaeab
4 changed files with 58 additions and 27 deletions

View File

@@ -364,7 +364,7 @@ unsigned int PropertyNormalList::getMemSize (void) const
return static_cast<unsigned int>(_lValueList.size() * sizeof(Base::Vector3f));
}
void PropertyNormalList::transform(const Base::Matrix4D &mat)
void PropertyNormalList::transformGeometry(const Base::Matrix4D &mat)
{
// A normal vector is only a direction with unit length, so we only need to rotate it
// (no translations or scaling)
@@ -386,10 +386,14 @@ void PropertyNormalList::transform(const Base::Matrix4D &mat)
}
}
aboutToSetValue();
// Rotate the normal vectors
for (int ii=0; ii<getSize(); ii++) {
set1Value(ii, rot * operator[](ii));
}
hasSetValue();
}
void PropertyNormalList::removeIndices( const std::vector<unsigned long>& uIndices )
@@ -489,7 +493,7 @@ std::vector<float> PropertyCurvatureList::getCurvature( int mode ) const
return fValues;
}
void PropertyCurvatureList::transform(const Base::Matrix4D &mat)
void PropertyCurvatureList::transformGeometry(const Base::Matrix4D &mat)
{
// The principal direction is only a vector with unit length, so we only need to rotate it
// (no translations or scaling)
@@ -511,6 +515,8 @@ void PropertyCurvatureList::transform(const Base::Matrix4D &mat)
}
}
aboutToSetValue();
// Rotate the principal directions
for (int ii=0; ii<getSize(); ii++) {
CurvatureInfo ci = operator[](ii);
@@ -518,6 +524,8 @@ void PropertyCurvatureList::transform(const Base::Matrix4D &mat)
ci.cMinCurvDir = rot * ci.cMinCurvDir;
set1Value(ii, ci);
}
hasSetValue();
}
void PropertyCurvatureList::removeIndices( const std::vector<unsigned long>& uIndices )