final case class Segment(p1: Point, p2: Point) extends Geometry3D with geometry.Segment with Product with Serializable
The instance of a limited span between two geometric coordinate positions, called "endpoints". Unlike mathematical lines, slope is treated the same as the vector leading from one point to the other and is the length of the segment.
- p1
a point
- p2
another point
- Source
- Segment.scala
- Alphabetic
- By Inheritance
- Segment
- Serializable
- Product
- Equals
- Segment
- Slope
- Geometry3D
- PrimitiveGeometry
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asLine: Line
Transform the segment into a matheatical line of the same slope.
- def center: Point
The center point of a segment is a position that is equally in between both endpoints.
The center point of a segment is a position that is equally in between both endpoints.
- returns
a point
- Definition Classes
- Segment → Geometry3D → PrimitiveGeometry
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def d: Vector3
The slope itself.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def length: Float
How long the slope goes on for.
- def moveCenter(point: geometry.Point): Geometry3D
Move the centroid of the shape to the given point
Move the centroid of the shape to the given point
- point
the new center point
- returns
geometry centered on the new point; ideally, should be the same type of geometry as the original object
- Definition Classes
- Segment → Geometry3D → PrimitiveGeometry
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val p1: Point
The first point, considered the "start".
- val p2: Point
The second point, considered the "end".
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()