Esempio n. 1
0
void Cylinder3D::getAABB(AABB3D& aabb) const
{
  Circle3D c;
  getBase(c);
  c.getAABB(aabb);
  if(axis.x > 0) aabb.bmax.x += axis.x*height;
  else aabb.bmin.x -= axis.x*height;
  if(axis.y > 0) aabb.bmax.y += axis.y*height;
  else aabb.bmin.y -= axis.y*height;
  if(axis.z > 0) aabb.bmax.z += axis.z*height;
  else aabb.bmin.z -= axis.z*height;
}