Class ElementPoints

java.lang.Object
org.opensourcephysics.display3d.simple3d.Element
org.opensourcephysics.display3d.simple3d.ElementPoints
All Implemented Interfaces:
Element, ElementPoints, InteractionSource

public class ElementPoints extends Element implements ElementPoints

Title: ElementPolygon

Description: A Polygon using the painter's algorithm

Version:
March 2005
Author:
Francisco Esquembre
  • Field Details

    • pointObjects

      protected org.opensourcephysics.display3d.simple3d.Object3D[] pointObjects
  • Constructor Details

    • ElementPoints

      public ElementPoints()
  • Method Details

    • setData

      public void setData(double[][] data)
      Description copied from interface: ElementPoints
      Sets the data for the coordinates of the points. Each entry in the data array corresponds to one point.
      Specified by:
      setData in interface ElementPoints
      Parameters:
      data - double[][] the double[nPoints][3] array with the data
    • getData

      public double[][] getData()
      Description copied from interface: ElementPoints
      Gets the data of the coordinates of the points
      Specified by:
      getData in interface ElementPoints
      Returns:
      double[][] the double[nPoints][3] array with the data
    • getExtrema

      public void getExtrema(double[] min, double[] max)
    • getTargetHit

      protected InteractionTarget getTargetHit(int x, int y)
      Description copied from class: Element
      Gets the target that is under the (x,y) position of the screen
      Overrides:
      getTargetHit in class Element
      Parameters:
      x - int
      y - int
      Returns:
      InteractionTarget
    • getLoader

      public static XML.ObjectLoader getLoader()
      Returns an XML.ObjectLoader to save and load object data.
      Returns:
      the XML.ObjectLoader