Kraken Logo

Kraken Engine

DocumentationGuidesShowcaseCommunity
Ctrl
K
Navigating the Docs
Building Docs
Overview
Anchor
AnimationController
Audio
Batcher
Body
Camera
Capsule
CastHit
CharacterBody
Circle
Collision
Color
DistanceJoint
Effect
Event
FilterJoint
Flip (Texture)
Font
ImageLayer
InputAction
Joint
Layer
Line
Map
MapObject
Mask
MotorJoint
MouseJoint
ObjectGroup
Orchestrator
PixelArray
PolarCoordinate
Polygon
PrismaticJoint
Rect
RevoluteJoint
RigidBody
Sample
Sampler
Shader
SheetStrip
StaticBody
Stream
Style
Terrain (TileSet)
Text
TextProperties
Texture
Tile (TileLayer)
Tile (TileSet)
TileLayer
TileResult (TileLayer)
TileSet
Timer
Transform
Tween
Vec2
Vertex
WeldJoint
WheelJoint
World

Built bydurkisneer1.Kraken Engine is open source and available onGitHub.

  1. Docs
  2. Classes
  3. Circle

Circle

Represents a circle shape with position and radius.

Constructor

  • Circle() → CircleCircle() → Circle
  • Circle(radius: float) → CircleCircle(radius: float) → Circle
  • Circle(pos: Vec2, radius: float) → CircleCircle(pos: Vec2, radius: float) → Circle
  • Circle(x: float, y: float, radius: float) → CircleCircle(x: float, y: float, radius: float) → Circle

Represents a circle shape with position and radius.

Properties


NameDescriptionType
areaGet the area of the circle.float
bottomGet or set the y coordinate of the bottommost point of the circle.float
circumferenceGet the circumference of the circle.float
diameterGet or set the diameter of the circle.float
leftGet or set the x coordinate of the leftmost point of the circle.float
posThe center position of the circle as a Vec2.Vec2
radiusThe radius of the circle.float
rightGet or set the x coordinate of the rightmost point of the circle.float
topGet or set the y coordinate of the topmost point of the circle.float

Methods


As Rect

as_rect() → Rectas_rect() → Rect

Return the smallest rectangle that fully contains the circle.

Copy

copy() → Circlecopy() → Circle

Return a copy of the circle.

PreviousCharacterBody
NextCollision

On this page

ConstructorPropertiesMethodsAs RectCopy