Commit d8a91260 authored by laurence's avatar laurence
Browse files

ENH: test for side of plane a point is on

parent 3e22fb9d
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -439,6 +439,14 @@ Foam::point Foam::plane::planePlaneIntersect ...@@ -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 void Foam::plane::writeDict(Ostream& os) const
{ {
os.writeKeyword("planeType") << "pointAndNormal" os.writeKeyword("planeType") << "pointAndNormal"
......
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