Package mgui.geometry
Class Vector2D
java.lang.Object
mgui.geometry.Shape2D
mgui.geometry.Vector2D
public class Vector2D extends Shape2D
Represents a 2D vector, defined by an end-point and a vector.
- 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
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description LineSegment2D
asLineSegment()
org.jogamp.vecmath.Point2f
getEndPoint()
org.jogamp.vecmath.Point2f
getStart()
org.jogamp.vecmath.Vector2f
getVector()
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
-
start
public org.jogamp.vecmath.Point2f start -
vector
public org.jogamp.vecmath.Vector2f vector
-
-
Constructor Details
-
Vector2D
public Vector2D(org.jogamp.vecmath.Point2f start, org.jogamp.vecmath.Vector2f vector) -
Vector2D
-
Vector2D
public Vector2D(float x_start, float y_start, float x_vector, float y_vector)
-
-
Method Details
-
getStart
public org.jogamp.vecmath.Point2f getStart() -
getVector
public org.jogamp.vecmath.Vector2f getVector() -
getEndPoint
public org.jogamp.vecmath.Point2f getEndPoint() -
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) -
asLineSegment
-