Annulus

Represents a transformable annulus in a two-dimensional Euclidean space.

Implementations that use default-implemented members of this interface must make sure that the properties center, orientation, outerRadius, innerRadius and the copy method are independent of other members and the computational complexity of these members is trivial.

Inheritors

Properties

Link copied to clipboard
open override val area: Float

Returns the area of this shape.

Link copied to clipboard
abstract val center: Vector2F

Returns the center of this annulus.

Link copied to clipboard
open override val innerDiameter: Float

Returns the inner diameter of this annulus.

Link copied to clipboard
abstract val innerRadius: Float

Returns the inner radius of this annulus.

Link copied to clipboard
abstract val orientation: ComplexF

Returns the orientation of this object in reference to the origin of ComplexF.ONE.

Link copied to clipboard
open override val outerDiameter: Float

Returns the outer diameter of this annulus.

Link copied to clipboard
abstract val outerRadius: Float

Returns the outer radius of this annulus.

Link copied to clipboard
open override val perimeter: Float

Returns the perimeter of this shape.

Link copied to clipboard
open override val position: Vector2F

Returns the position of this object in reference to the origin of Vector2F.ZERO.

Link copied to clipboard
open override val width: Float

Returns the width of this annulus. Width is the difference between the outer radius and the inner radius.

Functions

Link copied to clipboard
open fun closestPointTo(point: Vector2F): Vector2F

Returns the closest point on this annulus to the given point.

Link copied to clipboard
open operator fun component1(): Vector2F

Returns the center of this annulus.

Link copied to clipboard
open operator fun component2(): ComplexF

Returns the orientation of this annulus.

Link copied to clipboard
open operator fun component3(): Float

Returns the outerRadius of this annulus.

Link copied to clipboard
open operator fun component4(): Float

Returns the innerRadius of this annulus.

Link copied to clipboard
open operator fun contains(point: Vector2F): Boolean

Returns true if this annulus contains the given point.

open operator fun contains(annulus: Annulus): Boolean

Returns true if this annulus contains the whole given annulus.

open operator fun contains(circle: Circle): Boolean

Returns true if this annulus contains the whole given circle.

Link copied to clipboard
abstract fun copy(center: Vector2F = this.center, orientation: ComplexF = this.orientation, outerRadius: Float = this.outerRadius, innerRadius: Float = this.innerRadius): Annulus

Returns a copy of this instance with specified properties changed.

Link copied to clipboard
open override fun dilatedBy(point: Vector2F, factor: Float): Annulus

Returns a copy of this object that is dilated around the point by a factor.

Link copied to clipboard
open fun interpolated(to: Annulus, by: Float): Annulus

Returns a copy of this annulus interpolated to other annulus by a factor.

Link copied to clipboard
open fun intersects(annulus: Annulus): Boolean

Returns true if this annulus intersects the given annulus.

open fun intersects(circle: Circle): Boolean

Returns true if this annulus intersects the given circle.

open fun intersects(ray: Ray): Boolean

Returns true if this annulus intersects the given ray.

Link copied to clipboard
open override fun movedBy(displacement: Vector2F): Annulus

Returns a copy of this object that is moved by a displacement.

Link copied to clipboard
open override fun movedTo(position: Vector2F): Annulus

Returns a copy of this object that is moved to the position.

Link copied to clipboard
open override fun rotatedAroundPointBy(point: Vector2F, rotation: AngleF): Annulus
open override fun rotatedAroundPointBy(point: Vector2F, rotation: ComplexF): Annulus

Returns a copy of this object that is rotated around the point by a rotation.

Link copied to clipboard
open override fun rotatedAroundPointTo(point: Vector2F, orientation: AngleF): Annulus
open override fun rotatedAroundPointTo(point: Vector2F, orientation: ComplexF): Annulus

Returns a copy of this object that is rotated around the point to the orientation.

Link copied to clipboard
open override fun rotatedBy(rotation: AngleF): Annulus
open override fun rotatedBy(rotation: ComplexF): Annulus

Returns a copy of this object that is rotated by a rotation.

Link copied to clipboard
open override fun rotatedTo(orientation: AngleF): Annulus
open override fun rotatedTo(orientation: ComplexF): Annulus

Returns a copy of this object that is rotated to the orientation.

Link copied to clipboard
open override fun scaledBy(factor: Float): Annulus

Returns a copy of this object that is scaled by a factor.

Link copied to clipboard
open override fun transformedBy(displacement: Vector2F, rotation: AngleF): Annulus
open override fun transformedBy(displacement: Vector2F, rotation: ComplexF): Annulus

Returns a copy of this object that is moved by a displacement and rotated by a rotation.

open override fun transformedBy(displacement: Vector2F, rotation: AngleF, scaleFactor: Float): Annulus
open override fun transformedBy(displacement: Vector2F, rotation: ComplexF, scaleFactor: Float): Annulus

Returns a copy of this object that is moved by a displacement, rotated by a rotation, and scaled by a scaleFactor.

Link copied to clipboard
open override fun transformedTo(position: Vector2F, orientation: AngleF): Annulus
open override fun transformedTo(position: Vector2F, orientation: ComplexF): Annulus

Returns a copy of this object that is moved to the position and rotated to the orientation.