Net

data class Net(val point0: Vector2, val point1: Vector2, val circle: Circle) : LinearType<Net> , GeometricPrimitive2D(source)

Represents a net defined by two points and a circle. The net can be seen as a structure that connects the two points with the circle in between, forming a string-like shape.

This class implements basic linear transformations such as scaling and translation and defines how nets can interact by addition or subtraction.

Constructors

Link copied to clipboard
constructor(point0: Vector2, point1: Vector2, circle: Circle)

Properties

Link copied to clipboard
val circle: Circle

The circle around which the net is constructed.

Link copied to clipboard
val contour: ShapeContour

Creates a ShapeContour with three segments: two LineSegment and one Arc. These three components form a contour that resemble a string starting at point0, wrapping around the circle and ending at point1. If one of the points is inside the circle only a line segment tangent to the circle that starts at the other point is returned. If both points are inside the circle an empty contour is returned.

Link copied to clipboard
val point0: Vector2

The starting point of the net.

Link copied to clipboard
val point1: Vector2

The ending point of the net.

Functions

Link copied to clipboard
open operator override fun div(scale: Double): Net
Link copied to clipboard
open operator override fun minus(right: Net): Net
Link copied to clipboard
open operator override fun plus(right: Net): Net
Link copied to clipboard
open operator override fun times(scale: Double): Net