Class ElementSurface
java.lang.Object
org.opensourcephysics.display3d.simple3d.Element
org.opensourcephysics.display3d.simple3d.AbstractTile
org.opensourcephysics.display3d.simple3d.ElementSurface
- All Implemented Interfaces:
Element
,ElementSurface
,InteractionSource
Title: ElementBox
Description: Painter's algorithm implementation of a Surface
- Version:
- March 2005
- Author:
- Francisco Esquembre
-
Field Summary
FieldsFields inherited from class org.opensourcephysics.display3d.simple3d.AbstractTile
corners, numberOfTiles
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 TypeMethodDescriptionprotected void
This will be used by subclasses whenever there is a need to recompute the actual values of the corners before drawing.double[][][]
getData()
Gets the data of the surface.void
getExtrema
(double[] min, double[] max) static XML.ObjectLoader
Returns an XML.ObjectLoader to save and load object data.void
setData
(double[][][] data) Sets the data of the surface.Methods inherited from class org.opensourcephysics.display3d.simple3d.AbstractTile
getTargetHit, projectPoints, setColorBelowWhenEqual, setColorOriginAndDirection, setColorRegions, setCorners, setDrawQuickInterior
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
-
data
protected double[][][] data -
nu
protected int nu -
nv
protected int nv
-
-
Constructor Details
-
ElementSurface
public ElementSurface()
-
-
Method Details
-
setData
public void setData(double[][][] data) Description copied from interface:ElementSurface
Sets the data of the surface.- Specified by:
setData
in interfaceElementSurface
- Parameters:
data
- the double[nu][nv][3] array of coordinates for the surface.
-
getData
public double[][][] getData()Description copied from interface:ElementSurface
Gets the data of the surface.- Specified by:
getData
in interfaceElementSurface
- Returns:
- the double[nu][nv][3] array of coordinates of the surface.
-
getExtrema
public void getExtrema(double[] min, double[] max) -
computeCorners
protected void computeCorners()Description copied from class:AbstractTile
This will be used by subclasses whenever there is a need to recompute the actual values of the corners before drawing. Synchronization is recomended.- Specified by:
computeCorners
in classAbstractTile
-
getLoader
Returns an XML.ObjectLoader to save and load object data.- Returns:
- the XML.ObjectLoader
-