org.opensourcephysics.display3d.simple3d
Class ElementTessellation

java.lang.Object
  extended by org.opensourcephysics.display3d.simple3d.Element
      extended by org.opensourcephysics.display3d.simple3d.AbstractTile
          extended by org.opensourcephysics.display3d.simple3d.ElementTessellation
All Implemented Interfaces:
Element, ElementTessellation, InteractionSource

public class ElementTessellation
extends AbstractTile
implements ElementTessellation

Title: ElementBox

Description: Painter's algorithm implementation of a Surface

Version:
March 2005
Author:
Francisco Esquembre

Field Summary
protected  double[][][] data
           
 
Fields 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
ElementTessellation()
           
 
Method Summary
protected  void computeCorners()
          This will be used by subclasses whenever there is a need to recompute the actual values of the corners before drawing.
 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.
 double[][][] getTiles()
          Gets the data of the surface.
 void setTiles(double[][][] data)
          Sets the data of the tiles.
 
Methods inherited from class org.opensourcephysics.display3d.simple3d.AbstractTile
getDisplacementFactor, getTargetHit, projectPoints, setColorBelowWhenEqual, setColorOriginAndDirection, setColorRegions, setCorners, setDisplacementFactor, 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 Detail

data

protected double[][][] data
Constructor Detail

ElementTessellation

public ElementTessellation()
Method Detail

setTiles

public void setTiles(double[][][] data)
Description copied from interface: ElementTessellation
Sets the data of the tiles.

Specified by:
setTiles in interface ElementTessellation
Parameters:
data - the double[nTiles][nVertex][3] array of coordinates for the tiles. The number of vertex of the tiles may vary.

getTiles

public double[][][] getTiles()
Description copied from interface: ElementTessellation
Gets the data of the surface.

Specified by:
getTiles in interface ElementTessellation
Returns:
the double[nTiles][nVertex][3] array of coordinates for the tiles.

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

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 class AbstractTile

getLoader

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

Returns:
the XML.ObjectLoader