# LineSegment

indigo.shared.geometry.LineSegment
See theLineSegment companion object
final case class LineSegment(start: Vertex, end: Vertex)

## Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

## Members list

### Value members

#### Concrete methods

def bottom: Double
def closestPointOnLine(to: Vertex): Option[Vertex]
def closestPointOnLine(to: Vector2): Option[Vertex]
def contains(vertex: Vertex, tolerance: Double): Boolean
def contains(vertex: Vertex): Boolean
def contains(vector: Vector2): Boolean
def distanceToBoundary(vertex: Vertex): Double
def distanceToBoundary(vector: Vector2): Double
def intersectsAt(other: LineSegment): Option[Vertex]
def intersectsWith(other: LineSegment): Boolean
def isFacingVertex(vertex: Vertex): Boolean
def isFacingVertex(vector: Vector2): Boolean
def left: Double
def length: Double
def moveBy(amount: Vertex): LineSegment
def moveBy(x: Double, y: Double): LineSegment
def moveBy(amount: Vector2): LineSegment
def moveEndBy(amount: Vertex): LineSegment
def moveEndBy(x: Double, y: Double): LineSegment
def moveEndBy(amount: Vector2): LineSegment
def moveEndTo(newPosition: Vertex): LineSegment
def moveEndTo(x: Double, y: Double): LineSegment
def moveEndTo(newPosition: Vector2): LineSegment
def moveStartBy(x: Double, y: Double): LineSegment
def moveStartTo(newPosition: Vertex): LineSegment
def moveStartTo(x: Double, y: Double): LineSegment
def moveStartTo(newPosition: Vector2): LineSegment
def moveTo(newPosition: Vertex): LineSegment
def moveTo(x: Double, y: Double): LineSegment
def moveTo(newPosition: Vector2): LineSegment
def reflect(ray: LineSegment): Option[ReflectionData]

Reflects the incoming 'ray' off of this line segment as if it were a surface.

Reflects the incoming 'ray' off of this line segment as if it were a surface.

## Attributes

def right: Double
def sdf(vertex: Vertex): Double
def toLine: Line
def top: Double
def ~==(other: LineSegment): Boolean

#### Inherited methods

def productElementNames: Iterator[String]

## Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

## Attributes

Inherited from:
Product

#### Concrete fields

val center: Vertex
lazy val from: Vertex
lazy val to: Vertex