Package mgui.geometry
Class Point2D
java.lang.Object
mgui.geometry.Shape2D
mgui.geometry.Point2D
public class Point2D extends Shape2D
Represents a 2D point.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Nested Class Summary
Nested classes/interfaces inherited from interface mgui.interfaces.xml.XMLObject
XMLObject.XMLEncoding, XMLObject.XMLType
-
Field Summary
Fields Modifier and Type Field Description org.jogamp.vecmath.Point2f
point
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description static float
getDistance(org.jogamp.vecmath.Point2f pt1, org.jogamp.vecmath.Point2f pt2)
org.jogamp.vecmath.Point2f
getVertex(int i)
java.util.ArrayList<org.jogamp.vecmath.Point2f>
getVertices()
void
setVertices(java.util.ArrayList<org.jogamp.vecmath.Point2f> vertices)
Methods inherited from class mgui.geometry.Shape2D
clone, contains, getBounds, getCenterPt, getCoords, getDTD, getLocalName, getProximity, getProximityPoint, getShortXML, getSize, getVertices, getXML, getXML, getXMLSchema, handleXMLElementEnd, handleXMLElementStart, handleXMLString, setCoords, setVertices, transform, transform, writeXML, writeXML, writeXML
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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 classShape2D
-
setVertices
public void setVertices(java.util.ArrayList<org.jogamp.vecmath.Point2f> vertices)- Specified by:
setVertices
in classShape2D
-
getVertex
public org.jogamp.vecmath.Point2f getVertex(int i) -
getDistance
public static float getDistance(org.jogamp.vecmath.Point2f pt1, org.jogamp.vecmath.Point2f pt2)- Parameters:
pt1
- first pointpt2
- second point- Returns:
- distance between pt1 and pt2
-