ENH: test for side of plane a point is on

This commit is contained in:
laurence
2013-04-11 20:05:54 +01:00
parent 3e22fb9dd0
commit d8a91260c1

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -439,6 +439,14 @@ Foam::point Foam::plane::planePlaneIntersect
}
Foam::plane::side Foam::plane::sideOfPlane(const point& p) const
{
const scalar angle((p - basePoint_) & unitVector_);
return (angle < 0 ? FLIP : NORMAL);
}
void Foam::plane::writeDict(Ostream& os) const
{
os.writeKeyword("planeType") << "pointAndNormal"