def __init__(
        self,
        space,
        parent,
        position,
        size=None,
        angle=0,
        rotationSpeed=0,
        rotationEnabled=False,
        theme=themes.DefaultTheme,
        owner=None,
        helpSystem=None,
    ):

        AnnotatedObject.__init__(self, helpSystem)

        self._size = size
        assert size is None or len(size) == 2
        self._space = space
        self._parent = parent
        self._theme = theme
        self._owner = owner

        self._rootParent = parent
        self._hidden = False
        self._hideLock = threading.Lock()
        self._shapes = []
        self._body = None
        self._initPhysic(position, angle)
        assert self._body is not None

        self._root = avg.DivNode(parent=parent)
        self._root.pivot = (0, 0)

        if self.size is not None:
            self._interactionDiv = avg.DivNode(parent=self._root)
            self._interactionDiv.pos = util.vectorMult(self.size, -0.5)
            self._interactionDiv.size = self.size
            self._setInfoHandler(self._interactionDiv)
            if __debug__:
                self._interactionDiv.elementoutlinecolor = "FFFFFF"
        else:
            avg.Logger.get().trace(avg.Logger.WARNING, "{0} has no size".format(self))

        self._initLibavg(parent)

        self._setPosition(position)
        self.angle = angle

        self.alive = True

        self._rotationSpeed = rotationSpeed
        self._rotationEnabled = rotationEnabled

        if rotationEnabled:
            self._body.angular_velocity = rotationSpeed
    def __init__(self, pos, angle, parentStructure, helpSystem=None):
        AnnotatedObject.__init__(self, helpSystem)
        self.parent = parentStructure
        self.id = StructureElement._idCounter
        StructureElement._idCounter += 1
        self._helpSystem = helpSystem

        shape = self.parent._createCircleShape(
            self.parent.toAbsPos(pos), r=self.shapeOverflowFactor * self._size[0] / 2
        )
        self.shape = shape

        self.node = self._makeNode(pos, angle)

        self._neigborIndicator = None
        self._neigborLines = dict()