Circle

class Circle(radius: Double) : Shape

Circle class to create a circle object.

Constructors

Link copied to clipboard
fun Circle(radius: Double)

Functions

Link copied to clipboard
open override fun calcMass(density: Double)

Calculates the mass of a circle.

Link copied to clipboard
open override fun createAABB()

Generates an AABB and binds it to the body.

Link copied to clipboard
open override fun isPointInside(startPoint: Vec2): Boolean

Method to check if point is inside a body in world space.

Link copied to clipboard
open override fun rayIntersect(startPoint: Vec2, endPoint: Vec2, maxDistance: Double, rayLength: Double): Shape.IntersectionReturnElement

Checks if a ray intersects with the shape.

Properties

Link copied to clipboard
lateinit var body: CollisionBodyInterface
Link copied to clipboard
var orientation: Mat2
Link copied to clipboard
var radius: Double