Class Mesh2DInt

All Implemented Interfaces:
java.awt.datatransfer.Transferable, java.lang.Cloneable, java.lang.Comparable<InterfaceShape>, AttributeListener, AttributeObject, InterfaceObject, PersistentObject, VariableObject, PopupMenuObject, NamedObject, InterfaceQueryObject, InterfaceShapeQueryObject, ShapeListener, VertexDataColumnListener, InterfaceTransferable, TreeObject, CleanableObject, XMLObject, IconObject

public class Mesh2DInt
extends Shape2DInt
A 2D representation of a Mesh3DInt object. Allows references to vertices of the parent mesh.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Field Details

    • edges

      public java.util.ArrayList<org.jogamp.vecmath.Point2f[]> edges
    • indices

      public java.util.ArrayList<java.lang.Integer[]> indices
    • colours

      public java.util.ArrayList<Colour> colours
  • Constructor Details

    • Mesh2DInt

      public Mesh2DInt()
    • Mesh2DInt

      public Mesh2DInt​(java.util.ArrayList<org.jogamp.vecmath.Point2f[]> edges)
      Constructor for this Mesh2DInt.
      Parameters:
      edges - list of edges obtained from a parent mesh
    • Mesh2DInt

      public Mesh2DInt​(java.util.ArrayList<org.jogamp.vecmath.Point2f[]> edges, java.util.ArrayList<java.lang.Integer[]> indices)
      Constructor for this Mesh2DInt.
      Parameters:
      edges - list of edges obtained from a parent mesh
      indices - list of indices corresponding to the vertices of the parent mesh (can be null)
  • Method Details

    • draw

      public void draw​(java.awt.Graphics2D g, DrawingEngine d)
      Overrides:
      draw in class Shape2DInt
    • needsRedraw

      public boolean needsRedraw​(Attribute<?> a)
      Description copied from class: InterfaceShape
      Returns true if a change to attribute will require a redraw of this shape.
      Overrides:
      needsRedraw in class Shape2DInt
      Returns:
    • setColours

      public void setColours​(java.util.ArrayList<Colour> c)
    • merge

      public void merge​(Mesh2DInt mesh)
    • addEdge

      public void addEdge​(org.jogamp.vecmath.Point2f[] edge)
    • updateShape

      public void updateShape()
      Overrides:
      updateShape in class Shape2DInt