| 44 |
|
* |
| 45 |
|
* Created by Charles F. Vardeman II on 3/15/06. |
| 46 |
|
* @author Charles F. Vardeman II |
| 47 |
< |
* @version $Id: shapedLatticeSpherical.cpp,v 1.1 2006-03-22 20:57:09 chuckv Exp $ |
| 47 |
> |
* @version $Id: shapedLatticeSpherical.cpp,v 1.3 2006-10-17 15:24:29 gezelter Exp $ |
| 48 |
|
* |
| 49 |
|
*/ |
| 50 |
|
|
| 53 |
|
|
| 54 |
|
using namespace std; |
| 55 |
|
namespace oopse { |
| 56 |
– |
|
| 57 |
– |
shapedLatticeSpherical::shapedLatticeSpherical(double latticeConstant,std::string latticeType, double radius): |
| 58 |
– |
shapedLattice(latticeConstant, latticeType){ |
| 56 |
|
|
| 57 |
< |
sphereRadius_= radius; |
| 58 |
< |
Vector3d dimension; |
| 59 |
< |
dimension[0]=2.0*radius; |
| 60 |
< |
dimension[1]=2.0*radius; |
| 61 |
< |
dimension[2]=2.0*radius; |
| 62 |
< |
setGridDimension(dimension); |
| 57 |
> |
shapedLatticeSpherical::shapedLatticeSpherical(RealType latticeConstant, |
| 58 |
> |
std::string latticeType, |
| 59 |
> |
RealType radius) : shapedLattice(latticeConstant, latticeType){ |
| 60 |
> |
|
| 61 |
> |
sphereRadius_= radius; |
| 62 |
> |
Vector3d dimension; |
| 63 |
> |
dimension[0]=2.0*radius; |
| 64 |
> |
dimension[1]=2.0*radius; |
| 65 |
> |
dimension[2]=2.0*radius; |
| 66 |
> |
setGridDimension(dimension); |
| 67 |
> |
Vector3d origin; |
| 68 |
> |
origin[0] = latticeConstant / 2.0; |
| 69 |
> |
origin[1] = latticeConstant / 2.0; |
| 70 |
> |
origin[2] = latticeConstant / 2.0; |
| 71 |
> |
setOrigin(origin); |
| 72 |
> |
} |
| 73 |
> |
/** |
| 74 |
> |
* Determines whether a point lies with a sphere at origin 0 |
| 75 |
> |
* |
| 76 |
> |
*/ |
| 77 |
> |
bool shapedLatticeSpherical::isInterior(Vector3d point){ |
| 78 |
> |
bool isIT=false; |
| 79 |
> |
if (point.length() <= sphereRadius_) isIT=true; |
| 80 |
> |
return isIT; |
| 81 |
> |
} |
| 82 |
|
} |
| 67 |
– |
/** |
| 68 |
– |
* Determines whether a point lies with a sphere at origin 0 |
| 69 |
– |
* |
| 70 |
– |
*/ |
| 71 |
– |
|
| 72 |
– |
bool shapedLatticeSpherical::isInterior(Vector3d point){ |
| 73 |
– |
bool isIT=false; |
| 74 |
– |
if (point.length() <= sphereRadius_) isIT=true; |
| 75 |
– |
return isIT; |
| 76 |
– |
} |
| 77 |
– |
} |