Back to index

CModule.C

 
//----------------------------------------------------------------------------- 
//  $Header: /tmp_mnt/asis/offline/ceres/cool/project/RCS/CModule.C,v 2.1 1996/10/04 08:46:00 voigt Exp $ 
// 
//  COOL Program Library   
//  Copyright (C) CERES collaboration, 1996 
// 
//  Implementation of class CModule. 
// 
//----------------------------------------------------------------------------- 
#include "CModule.h" 
 
CModule::CModule() 
{ 
   x = 0; 
   y = 0; 
   width = 0; 
   height = 0; 
} 
 
 
CModule::CModule(int ix, int iy, int w, int h) 
{ 
   x = ix; 
   y = iy; 
   width = w; 
   height = h; 
} 
 
 
int CModule::operator== (const CModule& module) const 
{ 
   return (module.x == x && module.y == y); 
} 
 
 
CBoolean CModule::isInModule(int xx, int yy) 
{ 
   // 
   // Remember x,y is upper left edge 
   // 
   if (xx >= x && xx < x+width) { 
      if (yy <= y && yy > y-height) 
         return True; 
      else 
         return False; 
   } 
   else 
      return False; 
} 

Back to index