Package mgui.geometry

Interface Shape

All Superinterfaces:
java.lang.Cloneable, XMLObject
All Known Implementing Classes:
Box3D, Circle2D, Cube3D, Ellipse2D, Graph2D, Graph3D, Grid3D, LineSegment2D, LineSegment3D, Mesh3D, Plane3D, Point2D, PointSet2D, PointSet3D, Polygon2D, Polygon3D, RadialRep2D, Radius2D, Rect2D, Rect3D, Shape2D, Shape3D, Sphere3D, Text2D, Triangle2D, Triangle3D, Vector2D, Vector3D

public interface Shape
extends java.lang.Cloneable, XMLObject
This is the base interface for all shapes in mgui. All implementations of Shape must satisfy the following contract:
  • specify fixed (absolute) geometry; i.e., they must be representable in Cartesian coordinates, accessible through the getCoords method.
  • provide their coordinates or vertices as copies, guaranteeing that any alterations to their values will not affect the shape from which they were obtained; updates to the shape must therefore be done via their update methods (i.e., setCoords).
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Method Details

    • getCoords

      float[] getCoords()
    • setCoords

      void setCoords​(float[] f)
    • getSize

      int getSize()
    • transform

      boolean transform​(org.jogamp.vecmath.Matrix4d M)
      Transform this shape with affine transformation matrix M.
      Parameters:
      M -
      Returns:
    • transform

      boolean transform​(Jama.Matrix T)
      Transform this shape with affine transformation Jama matrix M.
      Parameters:
      M -
      Returns: