Package mgui.geometry

Class Point2D

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

public class Point2D
extends Shape2D
Represents a 2D point.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Field Details

    • point

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

    • Point2D

      public Point2D​(float x, float y)
    • Point2D

      public Point2D​(org.jogamp.vecmath.Point2f pt)
  • Method Details

    • 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
    • getDistance

      public static float getDistance​(org.jogamp.vecmath.Point2f pt1, org.jogamp.vecmath.Point2f pt2)
      Parameters:
      pt1 - first point
      pt2 - second point
      Returns:
      distance between pt1 and pt2