mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: vector mag(), magSqr() methods - complementary to dist(), distSqr()
ENH: use direct access to pointHit as point(), use dist(), distSqr() - if the pointHit has already been checked for hit(), can/should simply use point() noexcept access subsequently to avoid redundant checks. Using vector distSqr() methods provides a minor optimization (no itermediate temporary), but can also make for clearer code. ENH: copy construct pointIndexHit with different index - symmetric with constructing from a pointHit with an index STYLE: prefer pointHit point() instead of rawPoint()
This commit is contained in:
committed by
Andrew Heather
parent
5ec435aca3
commit
27c2cdc040
@ -1002,7 +1002,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (intStreamPtr)
|
||||
{
|
||||
intStreamPtr().write(hitInfo.hitPoint());
|
||||
intStreamPtr().write(hitInfo.point());
|
||||
}
|
||||
|
||||
// Try and find from other side.
|
||||
@ -1014,7 +1014,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (intStreamPtr)
|
||||
{
|
||||
intStreamPtr().write(hitInfo2.hitPoint());
|
||||
intStreamPtr().write(hitInfo2.point());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1044,7 +1044,7 @@ int main(int argc, char *argv[])
|
||||
//
|
||||
// if (hitInfo.hit() && intStreamPtr)
|
||||
// {
|
||||
// intStreamPtr().write(hitInfo.hitPoint());
|
||||
// intStreamPtr().write(hitInfo.point());
|
||||
//
|
||||
// label nearFaceI = hitInfo.index();
|
||||
// triPointRef nearTri(surf[nearFaceI].tri(surf.points()));
|
||||
|
||||
Reference in New Issue
Block a user