org.opensourcephysics.display3d.simple3d
Class ElementPoints

java.lang.Object
  extended by org.opensourcephysics.display3d.simple3d.Element
      extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.opensourcephysics.display3d.core.ElementPoints
ElementPoints.ElementPointsLoader
 
Field Summary
 
Fields inherited from interface org.opensourcephysics.display3d.core.Element
TARGET_POSITION, TARGET_SIZE
 
Constructor Summary
ElementPoints()
           
 
Method Summary
 double[][] getData()
          Gets the data of the coordinates of the points
 void getExtrema(double[] min, double[] max)
          Returns the extreme points of a box that contains the element.
static XML.ObjectLoader getLoader()
          Returns an XML.ObjectLoader to save and load object data.
 void setData(double[][] data)
          Sets the data for the coordinates of the points.
 
Methods inherited from class org.opensourcephysics.display3d.simple3d.Element
addInteractionListener, getDrawingPanel3D, getInteractionTarget, getName, getSizeX, getSizeY, getSizeZ, getStyle, getTransformation, getX, getY, getZ, isVisible, loadUnmutableObjects, removeInteractionListener, setName, setSizeX, setSizeXYZ, setSizeXYZ, setSizeY, setSizeZ, setTransformation, setVisible, setX, setXYZ, setXYZ, setY, setZ, toBodyFrame, toSpaceFrame
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opensourcephysics.display3d.core.Element
getDrawingPanel3D, getName, getSizeX, getSizeY, getSizeZ, getStyle, getTransformation, getX, getY, getZ, isVisible, loadUnmutableObjects, setName, setSizeX, setSizeXYZ, setSizeXYZ, setSizeY, setSizeZ, setTransformation, setVisible, setX, setXYZ, setXYZ, setY, setZ, toBodyFrame, toSpaceFrame
 
Methods inherited from interface org.opensourcephysics.display3d.core.interaction.InteractionSource
addInteractionListener, getInteractionTarget, removeInteractionListener
 

Constructor Detail

ElementPoints

public ElementPoints()
Method Detail

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)
Description copied from class: Element
Returns the extreme points of a box that contains the element.

Parameters:
min - double[] A previously allocated double[3] array that will hold the minimum point
max - double[] A previously allocated double[3] array that will hold the maximum point

getLoader

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

Returns:
the XML.ObjectLoader