mini_arcade_core.spaces.collision.specs ======================================= .. py:module:: mini_arcade_core.spaces.collision.specs .. autoapi-nested-parse:: Collision collider specifications. Attributes ---------- .. autoapisummary:: mini_arcade_core.spaces.collision.specs.ColliderKind Classes ------- .. autoapisummary:: mini_arcade_core.spaces.collision.specs.ColliderSpec mini_arcade_core.spaces.collision.specs.RectColliderSpec mini_arcade_core.spaces.collision.specs.CircleColliderSpec mini_arcade_core.spaces.collision.specs.LineColliderSpec mini_arcade_core.spaces.collision.specs.PolyColliderSpec Module Contents --------------- .. py:data:: ColliderKind .. py:class:: ColliderSpec Simple collider specification. :ivar kind: The kind of collider (rect, circle, poly, line). .. py:attribute:: kind :type: ColliderKind .. py:class:: RectColliderSpec Bases: :py:obj:`ColliderSpec` Rectangle collider specification. :ivar kind: The kind of collider (rect). :ivar size: The size of the rectangle collider. If None, derived from transform.size. .. py:attribute:: kind :type: Literal['rect'] :value: 'rect' .. py:attribute:: size :type: mini_arcade_core.spaces.geometry.size.Size2D | None :value: None .. py:class:: CircleColliderSpec Bases: :py:obj:`ColliderSpec` Circle collider specification. :ivar kind: The kind of collider (circle). :ivar radius: The radius of the circle collider. If None, derived from min(size)/2. .. py:attribute:: kind :type: Literal['circle'] :value: 'circle' .. py:attribute:: radius :type: float | None :value: None .. py:class:: LineColliderSpec Bases: :py:obj:`ColliderSpec` Line collider specification. :ivar kind: The kind of collider (line). :ivar a: The start point of the line collider (local-space). :ivar b: The end point of the line collider (local-space). .. py:attribute:: kind :type: Literal['line'] :value: 'line' .. py:attribute:: a :type: mini_arcade_core.spaces.math.vec2.Vec2 .. py:attribute:: b :type: mini_arcade_core.spaces.math.vec2.Vec2 .. py:class:: PolyColliderSpec Bases: :py:obj:`ColliderSpec` Polygon collider specification. :ivar kind: The kind of collider (poly). :ivar points: The points of the polygon collider (local-space). .. py:attribute:: kind :type: Literal['poly'] :value: 'poly' .. py:attribute:: points :type: tuple[mini_arcade_core.spaces.math.vec2.Vec2, Ellipsis] :value: ()