def __init__(self, xmin=None, xmax=None, ymin=None, ymax=None, pos=None, vel=(0, 0), mass=None, density=None, bbox=None, shape=None, rect=None, **kwds): # Define as propriedades das caixas de contorno xmin, xmax, ymin, ymax = aabb_bbox(bbox=bbox, rect=rect, shape=shape, pos=pos, xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax) pos = ((xmin + xmax) / 2., (ymin + ymax) / 2.) self._delta_x = dx = (xmax - xmin) / 2 self._delta_y = dy = (ymax - ymin) / 2 self.cbb_radius = sqrt(dx**2 + dy**2) aabb = _AABB(xmin, xmax, ymin, ymax) super(AABB, self).__init__(pos, vel, mass=mass, density=density, baseshape=aabb, **kwds)
def __init__(self, xmin=None, xmax=None, ymin=None, ymax=None, pos=None, vel=(0, 0), mass=None, density=None, bbox=None, shape=None, rect=None, **kwds): # Define as propriedades das caixas de contorno xmin, xmax, ymin, ymax = aabb_bbox(bbox=bbox, rect=rect, shape=shape, pos=pos, xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax) pos = ((xmin + xmax) / 2., (ymin + ymax) / 2.) self._delta_x = dx = (xmax - xmin) / 2 self._delta_y = dy = (ymax - ymin) / 2 self.cbb_radius = sqrt(dx ** 2 + dy ** 2) super(AABB, self).__init__(pos, vel, mass=mass, density=density, **kwds)
def ROG(self): '''Retorna o raio de giração''' return sqrt(self.ROG_sqr())
def ROG(self): '''Retorna o raio de giração do círculo''' return self.cbb_radius / sqrt(2)
def ROG(self): '''Retorna o raio de giração do círculo''' return self._radius / sqrt(2)