Package mgui.geometry
Class Ellipse2D
java.lang.Object
mgui.geometry.Shape2D
mgui.geometry.Ellipse2D
public class Ellipse2D extends Shape2D
Represents an ellipse shape.
- 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
-
Constructor Summary
Constructors Constructor Description Ellipse2D()
Creates an ellipse centered on (0,0) with uniform radius of 1.0.Ellipse2D(org.jogamp.vecmath.Point2f center, org.jogamp.vecmath.Vector2f axis_a, float b)
Creates an ellipsed centered oncenter
, with given "a" axis and perpendicular "b" axis of magnitudeb
. -
Method Summary
Modifier and Type Method Description org.jogamp.vecmath.Vector2f
getAxisA()
org.jogamp.vecmath.Vector2f
getAxisB()
org.jogamp.vecmath.Point2f
getCenter()
org.jogamp.vecmath.Point2f
getVertex(int i)
java.util.ArrayList<org.jogamp.vecmath.Point2f>
getVertices()
void
setAxisB(float b)
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
-
Constructor Details
-
Ellipse2D
public Ellipse2D()Creates an ellipse centered on (0,0) with uniform radius of 1.0. -
Ellipse2D
public Ellipse2D(org.jogamp.vecmath.Point2f center, org.jogamp.vecmath.Vector2f axis_a, float b)Creates an ellipsed centered oncenter
, with given "a" axis and perpendicular "b" axis of magnitudeb
.- Parameters:
center
- Center point of ellipseaxis_a
- Primary "a" axisb
- Magnitude of secondary "b" axis (perpendicular to a)
-
-
Method Details
-
getAxisA
public org.jogamp.vecmath.Vector2f getAxisA() -
getAxisB
public org.jogamp.vecmath.Vector2f getAxisB() -
getCenter
public org.jogamp.vecmath.Point2f getCenter() -
setAxisB
public void setAxisB(float b) -
getVertex
public org.jogamp.vecmath.Point2f getVertex(int i) -
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
-