Class ElementPoints
java.lang.Object
org.opensourcephysics.display3d.simple3d.Element
org.opensourcephysics.display3d.simple3d.ElementPoints
- All Implemented Interfaces:
Element
,ElementPoints
,InteractionSource
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
FieldsModifier and TypeFieldDescriptionprotected org.opensourcephysics.display3d.simple3d.Object3D[]
Fields inherited from class org.opensourcephysics.display3d.simple3d.Element
targetPosition, targetSize
Fields inherited from interface org.opensourcephysics.display3d.core.Element
TARGET_POSITION, TARGET_SIZE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[][]
getData()
Gets the data of the coordinates of the pointsvoid
getExtrema
(double[] min, double[] max) static XML.ObjectLoader
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 screenvoid
setData
(double[][] data) Sets the data for the coordinates of the points.Methods inherited from class org.opensourcephysics.display3d.simple3d.Element
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
Methods inherited from class java.lang.Object
clone, equals, finalize, 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
-
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 interfaceElementPoints
- 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 interfaceElementPoints
- Returns:
- double[][] the double[nPoints][3] array with the data
-
getExtrema
public void getExtrema(double[] min, double[] max) -
getTargetHit
Description copied from class:Element
Gets the target that is under the (x,y) position of the screen- Overrides:
getTargetHit
in classElement
- Parameters:
x
- inty
- int- Returns:
- InteractionTarget
-
getLoader
Returns an XML.ObjectLoader to save and load object data.- Returns:
- the XML.ObjectLoader
-