Transformable

interface Transformable

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

Direct implementations of this interface must consider that new interface members may be added in the next versions of the library. Implementations that are safe to use from a compatibility perspective are those that are defined in the library, like Square.

Inheritors

Properties

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
abstract val position: Vector2F

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

Functions

Link copied to clipboard
abstract fun dilatedBy(point: Vector2F, factor: Float): Transformable

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

Link copied to clipboard
abstract fun movedBy(displacement: Vector2F): Transformable

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

Link copied to clipboard
abstract fun movedTo(position: Vector2F): Transformable

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

Link copied to clipboard
abstract fun rotatedAroundPointBy(point: Vector2F, rotation: AngleF): Transformable
abstract fun rotatedAroundPointBy(point: Vector2F, rotation: ComplexF): Transformable

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

Link copied to clipboard
abstract fun rotatedAroundPointTo(point: Vector2F, orientation: AngleF): Transformable
abstract fun rotatedAroundPointTo(point: Vector2F, orientation: ComplexF): Transformable

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

Link copied to clipboard
abstract fun rotatedBy(rotation: AngleF): Transformable
abstract fun rotatedBy(rotation: ComplexF): Transformable

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

Link copied to clipboard
abstract fun rotatedTo(orientation: AngleF): Transformable
abstract fun rotatedTo(orientation: ComplexF): Transformable

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

Link copied to clipboard
abstract fun scaledBy(factor: Float): Transformable

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

Link copied to clipboard
abstract fun transformedBy(displacement: Vector2F, rotation: AngleF): Transformable
abstract fun transformedBy(displacement: Vector2F, rotation: ComplexF): Transformable

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

abstract fun transformedBy(displacement: Vector2F, rotation: AngleF, scaleFactor: Float): Transformable
abstract fun transformedBy(displacement: Vector2F, rotation: ComplexF, scaleFactor: Float): Transformable

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
abstract fun transformedTo(position: Vector2F, orientation: AngleF): Transformable
abstract fun transformedTo(position: Vector2F, orientation: ComplexF): Transformable

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