Package mgui.geometry

Class LineSegment2D

java.lang.Object
mgui.geometry.Shape2D
mgui.geometry.LineSegment2D
All Implemented Interfaces:
java.lang.Cloneable, Shape, XMLObject

public class LineSegment2D
extends Shape2D
Represents a line segment in R2.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Field Details

    • pt1

      public org.jogamp.vecmath.Point2f pt1
    • pt2

      public org.jogamp.vecmath.Point2f pt2
  • Constructor Details

    • LineSegment2D

      public LineSegment2D()
    • LineSegment2D

      public LineSegment2D​(org.jogamp.vecmath.Point2f thisPt1, org.jogamp.vecmath.Point2f thisPt2)
  • Method Details

    • clone

      public java.lang.Object clone()
      Overrides:
      clone in class Shape2D
    • getVertices

      public java.util.ArrayList<org.jogamp.vecmath.Point2f> getVertices()
      Specified by:
      getVertices in class Shape2D
    • setVertices

      public void setVertices​(java.util.ArrayList<org.jogamp.vecmath.Point2f> vertices)
      Specified by:
      setVertices in class Shape2D
    • getVertex

      public org.jogamp.vecmath.Point2f getVertex​(int i)
      Specified by:
      getVertex in class Shape2D
    • getLength

      public float getLength()
    • getProximityPoint

      public org.jogamp.vecmath.Point2f getProximityPoint​(org.jogamp.vecmath.Point2f thisPt)
      Overrides:
      getProximityPoint in class Shape2D
    • getProximity

      public float getProximity​(org.jogamp.vecmath.Point2f thisPt)
      Overrides:
      getProximity in class Shape2D
    • asVector

      public Vector2D asVector()