git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@3642 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2010-01-11 20:25:07 +00:00
parent 056c4e38d3
commit 322ed02798
23 changed files with 506 additions and 49 deletions

View File

@ -240,17 +240,15 @@ RegPrism::~RegPrism()
xyz/lo = lower-left corner of prism
------------------------------------------------------------------------- */
int RegPrism::match(double x, double y, double z)
int RegPrism::inside(double x, double y, double z)
{
double a = hinv[0][0]*(x-xlo) + hinv[0][1]*(y-ylo) + hinv[0][2]*(z-zlo);
double b = hinv[1][1]*(y-ylo) + hinv[1][2]*(z-zlo);
double c = hinv[2][2]*(z-zlo);
int inside = 0;
if (a >= 0.0 && a <= 1.0 && b >= 0.0 && b <= 1.0 && c >= 0.0 && c <= 1.0)
inside = 1;
return !(inside ^ interior); // 1 if same, 0 if different
return 1;
return 0;
}
/* ----------------------------------------------------------------------