mini_arcade_core.spaces.geometry.shapes

Geometry shape definitions.

Attributes

Classes

Shape2D

Simple shape entity.

Rect

Rectangle shape entity.

Circle

Circle shape entity.

Triangle

Triangle shape entity.

Line

Line shape entity.

Poly

Polygon shape entity.

Module Contents

mini_arcade_core.spaces.geometry.shapes.ShapeKind
class mini_arcade_core.spaces.geometry.shapes.Shape2D[source]

Simple shape entity.

Variables:

kind – The kind of shape (rect, circle, triangle, line, poly).

kind: ShapeKind
class mini_arcade_core.spaces.geometry.shapes.Rect[source]

Bases: Shape2D

Rectangle shape entity.

Variables:
  • kind – The kind of shape (rect).

  • corner_radius – The corner radius of the rectangle.

kind: Literal['rect'] = 'rect'
corner_radius: float = 0.0
class mini_arcade_core.spaces.geometry.shapes.Circle[source]

Bases: Shape2D

Circle shape entity.

Variables:
  • kind – The kind of shape (circle).

  • radius – The radius of the circle.

kind: Literal['circle'] = 'circle'
radius: float = 0.0
class mini_arcade_core.spaces.geometry.shapes.Triangle[source]

Bases: Shape2D

Triangle shape entity.

Variables:

kind – The kind of shape (triangle).

kind: Literal['triangle'] = 'triangle'
class mini_arcade_core.spaces.geometry.shapes.Line[source]

Bases: Shape2D

Line shape entity.

Variables:
  • kind – The kind of shape (line).

  • a – The start point of the line (local-space).

  • b – The end point of the line (local-space).

  • dash_length – Optional dash length in pixels for dashed rendering.

  • dash_gap – Optional gap length in pixels for dashed rendering.

kind: Literal['line'] = 'line'
a: mini_arcade_core.spaces.math.vec2.Vec2
b: mini_arcade_core.spaces.math.vec2.Vec2
dash_length: float | None = None
dash_gap: float | None = None
class mini_arcade_core.spaces.geometry.shapes.Poly[source]

Bases: Shape2D

Polygon shape entity.

Variables:
  • kind – The kind of shape (poly).

  • points – The points of the polygon (local-space).

kind: Literal['poly'] = 'poly'
points: list[mini_arcade_core.spaces.math.vec2.Vec2] | None = None