Element
, ElementPoints
, InteractionSource
public class ElementPoints extends Element implements ElementPoints
Title: ElementPolygon
Description: A Polygon using the painter's algorithm
ElementPoints.ElementPointsLoader
Modifier and Type | Field | Description |
---|---|---|
protected org.opensourcephysics.display3d.simple3d.Object3D[] |
pointObjects |
TARGET_POSITION, TARGET_SIZE
targetPosition, targetSize
Constructor | Description |
---|---|
ElementPoints() |
Modifier and Type | Method | Description |
---|---|---|
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.
|
protected InteractionTarget |
getTargetHit(int x,
int y) |
Gets the target that is under the (x,y) position of the screen
|
void |
setData(double[][] data) |
Sets the data for the coordinates of the points.
|
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
addInteractionListener, getAxesMode, getDrawingPanel3D, getHotSpotBodyCoordinates, getInteractionTarget, getName, getSizeX, getSizeY, getSizeZ, getStyle, getTransformation, getX, getY, getZ, isReallyVisible, isVisible, loadUnmutableObjects, removeInteractionListener, setName, setSizeX, setSizeXYZ, setSizeXYZ, setSizeY, setSizeZ, setTransformation, setVisible, setX, setXYZ, setXYZ, setY, setZ, toBodyFrame, toSpaceFrame
addInteractionListener, getInteractionTarget, removeInteractionListener
protected org.opensourcephysics.display3d.simple3d.Object3D[] pointObjects
public void setData(double[][] data)
ElementPoints
setData
in interface ElementPoints
data
- double[][] the double[nPoints][3] array with the datapublic double[][] getData()
ElementPoints
getData
in interface ElementPoints
public void getExtrema(double[] min, double[] max)
Element
min
- double[] A previously allocated double[3] array that will hold
the minimum pointmax
- double[] A previously allocated double[3] array that will hold
the maximum pointprotected InteractionTarget getTargetHit(int x, int y)
Element
getTargetHit
in class Element
x
- inty
- intpublic static XML.ObjectLoader getLoader()