+ Prefer prefix ++/-- operators for non-primitive types
This commit is contained in:
parent
4909d628f5
commit
5a78a6ab79
|
@ -199,7 +199,7 @@ unsigned long MeshKernel::AddFacets(const std::vector<MeshFacet> &rclFAry)
|
||||||
|
|
||||||
// Check for the above edges in the current facet array
|
// Check for the above edges in the current facet array
|
||||||
k=0;
|
k=0;
|
||||||
for (MeshFacetArray::_TIterator pF = _aclFacetArray.begin(); pF != _aclFacetArray.end(); pF++, k++) {
|
for (MeshFacetArray::_TIterator pF = _aclFacetArray.begin(); pF != _aclFacetArray.end(); ++pF, k++) {
|
||||||
// if none of the points references one of the edges ignore the facet
|
// if none of the points references one of the edges ignore the facet
|
||||||
if (!this->_aclPointArray[pF->_aulPoints[0]].IsFlag(MeshPoint::INVALID) &&
|
if (!this->_aclPointArray[pF->_aulPoints[0]].IsFlag(MeshPoint::INVALID) &&
|
||||||
!this->_aclPointArray[pF->_aulPoints[1]].IsFlag(MeshPoint::INVALID) &&
|
!this->_aclPointArray[pF->_aulPoints[1]].IsFlag(MeshPoint::INVALID) &&
|
||||||
|
@ -613,7 +613,7 @@ void MeshKernel::RemoveInvalids ()
|
||||||
pDIter = aulDecrements.begin();
|
pDIter = aulDecrements.begin();
|
||||||
ulDec = 0;
|
ulDec = 0;
|
||||||
pPEnd = _aclPointArray.end();
|
pPEnd = _aclPointArray.end();
|
||||||
for (pPIter = _aclPointArray.begin(); pPIter != pPEnd; pPIter++) {
|
for (pPIter = _aclPointArray.begin(); pPIter != pPEnd; ++pPIter) {
|
||||||
*pDIter++ = ulDec;
|
*pDIter++ = ulDec;
|
||||||
if (pPIter->IsValid() == false)
|
if (pPIter->IsValid() == false)
|
||||||
ulDec++;
|
ulDec++;
|
||||||
|
@ -621,7 +621,7 @@ void MeshKernel::RemoveInvalids ()
|
||||||
|
|
||||||
// correct point indices of the facets
|
// correct point indices of the facets
|
||||||
pFEnd = _aclFacetArray.end();
|
pFEnd = _aclFacetArray.end();
|
||||||
for (pFIter = _aclFacetArray.begin(); pFIter != pFEnd; pFIter++) {
|
for (pFIter = _aclFacetArray.begin(); pFIter != pFEnd; ++pFIter) {
|
||||||
if (pFIter->IsValid() == true) {
|
if (pFIter->IsValid() == true) {
|
||||||
pFIter->_aulPoints[0] -= aulDecrements[pFIter->_aulPoints[0]];
|
pFIter->_aulPoints[0] -= aulDecrements[pFIter->_aulPoints[0]];
|
||||||
pFIter->_aulPoints[1] -= aulDecrements[pFIter->_aulPoints[1]];
|
pFIter->_aulPoints[1] -= aulDecrements[pFIter->_aulPoints[1]];
|
||||||
|
@ -636,7 +636,7 @@ void MeshKernel::RemoveInvalids ()
|
||||||
MeshPointArray aclTempPt(ulNewPts);
|
MeshPointArray aclTempPt(ulNewPts);
|
||||||
MeshPointArray::_TIterator pPTemp = aclTempPt.begin();
|
MeshPointArray::_TIterator pPTemp = aclTempPt.begin();
|
||||||
pPEnd = _aclPointArray.end();
|
pPEnd = _aclPointArray.end();
|
||||||
for (pPIter = _aclPointArray.begin(); pPIter != pPEnd; pPIter++) {
|
for (pPIter = _aclPointArray.begin(); pPIter != pPEnd; ++pPIter) {
|
||||||
if (pPIter->IsValid() == true)
|
if (pPIter->IsValid() == true)
|
||||||
*pPTemp++ = *pPIter;
|
*pPTemp++ = *pPIter;
|
||||||
}
|
}
|
||||||
|
@ -660,7 +660,7 @@ void MeshKernel::RemoveInvalids ()
|
||||||
|
|
||||||
// correct neighbour indices of the facets
|
// correct neighbour indices of the facets
|
||||||
pFEnd = _aclFacetArray.end();
|
pFEnd = _aclFacetArray.end();
|
||||||
for (pFIter = _aclFacetArray.begin(); pFIter != pFEnd; pFIter++) {
|
for (pFIter = _aclFacetArray.begin(); pFIter != pFEnd; ++pFIter) {
|
||||||
if (pFIter->IsValid() == true) {
|
if (pFIter->IsValid() == true) {
|
||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
k = pFIter->_aulNeighbours[i];
|
k = pFIter->_aulNeighbours[i];
|
||||||
|
@ -680,7 +680,7 @@ void MeshKernel::RemoveInvalids ()
|
||||||
MeshFacetArray aclFArray(ulDelFacets);
|
MeshFacetArray aclFArray(ulDelFacets);
|
||||||
MeshFacetArray::_TIterator pFTemp = aclFArray.begin();
|
MeshFacetArray::_TIterator pFTemp = aclFArray.begin();
|
||||||
pFEnd = _aclFacetArray.end();
|
pFEnd = _aclFacetArray.end();
|
||||||
for (pFIter = _aclFacetArray.begin(); pFIter != pFEnd; pFIter++) {
|
for (pFIter = _aclFacetArray.begin(); pFIter != pFEnd; ++pFIter) {
|
||||||
if (pFIter->IsValid() == true)
|
if (pFIter->IsValid() == true)
|
||||||
*pFTemp++ = *pFIter;
|
*pFTemp++ = *pFIter;
|
||||||
}
|
}
|
||||||
|
|
|
@ -305,7 +305,7 @@ void SetOperations::TriangulateMesh (const MeshKernel &cutMesh, int side)
|
||||||
{
|
{
|
||||||
// Triangulate Mesh
|
// Triangulate Mesh
|
||||||
std::map<unsigned long, std::list<std::set<MeshPoint>::iterator> >::iterator it1;
|
std::map<unsigned long, std::list<std::set<MeshPoint>::iterator> >::iterator it1;
|
||||||
for (it1 = _facet2points[side].begin(); it1 != _facet2points[side].end(); it1++)
|
for (it1 = _facet2points[side].begin(); it1 != _facet2points[side].end(); ++it1)
|
||||||
{
|
{
|
||||||
std::vector<Vector3f> points;
|
std::vector<Vector3f> points;
|
||||||
std::set<MeshPoint> pointsSet;
|
std::set<MeshPoint> pointsSet;
|
||||||
|
@ -327,7 +327,7 @@ void SetOperations::TriangulateMesh (const MeshKernel &cutMesh, int side)
|
||||||
|
|
||||||
// triangulated facets
|
// triangulated facets
|
||||||
std::list<std::set<MeshPoint>::iterator>::iterator it2;
|
std::list<std::set<MeshPoint>::iterator>::iterator it2;
|
||||||
for (it2 = it1->second.begin(); it2 != it1->second.end(); it2++)
|
for (it2 = it1->second.begin(); it2 != it1->second.end(); ++it2)
|
||||||
{
|
{
|
||||||
if (pointsSet.find(*(*it2)) == pointsSet.end())
|
if (pointsSet.find(*(*it2)) == pointsSet.end())
|
||||||
{
|
{
|
||||||
|
@ -464,7 +464,7 @@ void SetOperations::CollectFacets (int side, float mult)
|
||||||
// search for facet not visited
|
// search for facet not visited
|
||||||
MeshFacetArray::_TConstIterator itf;
|
MeshFacetArray::_TConstIterator itf;
|
||||||
const MeshFacetArray& rFacets = mesh.GetFacets();
|
const MeshFacetArray& rFacets = mesh.GetFacets();
|
||||||
for (itf = rFacets.begin(); itf != rFacets.end(); itf++)
|
for (itf = rFacets.begin(); itf != rFacets.end(); ++itf)
|
||||||
{
|
{
|
||||||
if (!itf->IsFlag(MeshFacet::VISIT))
|
if (!itf->IsFlag(MeshFacet::VISIT))
|
||||||
{ // Facet found, visit neighbours
|
{ // Facet found, visit neighbours
|
||||||
|
@ -481,7 +481,7 @@ void SetOperations::CollectFacets (int side, float mult)
|
||||||
}
|
}
|
||||||
|
|
||||||
// add all facets to the result vector
|
// add all facets to the result vector
|
||||||
for (itf = rFacets.begin(); itf != rFacets.end(); itf++)
|
for (itf = rFacets.begin(); itf != rFacets.end(); ++itf)
|
||||||
{
|
{
|
||||||
if (itf->IsFlag(MeshFacet::TMP0))
|
if (itf->IsFlag(MeshFacet::TMP0))
|
||||||
{
|
{
|
||||||
|
|
|
@ -313,7 +313,7 @@ unsigned long MeshSearchNeighbours::NeighboursFacetFromFacet (unsigned long ulFa
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset marked facets, points
|
// reset marked facets, points
|
||||||
for (std::vector<MeshFacetArray::_TConstIterator>::iterator pF = aclTestedFacet.begin(); pF != aclTestedFacet.end(); pF++)
|
for (std::vector<MeshFacetArray::_TConstIterator>::iterator pF = aclTestedFacet.begin(); pF != aclTestedFacet.end(); ++pF)
|
||||||
(*pF)->ResetFlag(MeshFacet::MARKED);
|
(*pF)->ResetFlag(MeshFacet::MARKED);
|
||||||
for (std::set<unsigned long>::iterator pR = _aclResult.begin(); pR != _aclResult.end(); ++pR)
|
for (std::set<unsigned long>::iterator pR = _aclResult.begin(); pR != _aclResult.end(); ++pR)
|
||||||
_rclPAry[*pR].ResetFlag(MeshPoint::MARKED);
|
_rclPAry[*pR].ResetFlag(MeshPoint::MARKED);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user