// ファイル名： Ch05/BoxLocator/Box.cc 
#include "./Box.hh" 
 
Box::Box() 
{} 
Box::Box(string name, BoxPars sizeXYZ) 
{ 
  boxName = name; boxPars = sizeXYZ;  
} 
Box::~Box() 
{} 
string Box::getBoxName() 
{  
  return boxName; 
} 
BoxPars Box::getBoxPars() 
{  
  return boxPars; 
} 
bool Box::isPointIn(Point3D testPoint) 
{  
  return (  
    testPoint[0] > -boxPars[0]/2.0  &&  
    testPoint[0] < +boxPars[0]/2.0  &&  
    testPoint[1] > -boxPars[1]/2.0  &&  
    testPoint[1] < +boxPars[1]/2.0  &&  
    testPoint[2] > -boxPars[2]/2.0  &&  
    testPoint[2] < +boxPars[2]/2.0 ); 
} 
