Package mgui.geometry

Class Ellipse2D

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

public class Ellipse2D
extends Shape2D
Represents an ellipse shape.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • 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 on center, with given "a" axis and perpendicular "b" axis of magnitude b.
      Parameters:
      center - Center point of ellipse
      axis_a - Primary "a" axis
      b - 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)
      Specified by:
      getVertex 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