org.opensourcephysics.display3d.simple3d
Class ElementSphere

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

public class ElementSphere
extends ElementEllipsoid
implements ElementSphere

Title: ElementSphere

Description: An Ellipsoid with the same size in all dimensions.

Changing the size in any dimension also sets the other sizes. Setting different sizes to X, Y, and Z will result in setting the radius to the largest of the three dimensions.

Version:
May 2005
Author:
Francisco Esquembre

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.opensourcephysics.display3d.core.ElementEllipsoid
ElementEllipsoid.Loader
 
Field Summary
 
Fields inherited from class org.opensourcephysics.display3d.simple3d.ElementEllipsoid
TO_RADIANS
 
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
ElementSphere()
          Constructor ElementSphere
ElementSphere(double radius)
          Constructor ElementSphere
 
Method Summary
 double getRadius()
          Gets the radius
 void setRadius(double radius)
          Sets the radius.
 void setSizeX(double sizeX)
          Set the size along the X axis
 void setSizeXYZ(double sizeX, double sizeY, double sizeZ)
          Set the size along the X, Y and Z axes
 void setSizeY(double sizeY)
          Set the size along the Y axis
 void setSizeZ(double sizeZ)
          Set the size along the Z axis
 
Methods inherited from class org.opensourcephysics.display3d.simple3d.ElementEllipsoid
computeCorners, getLoader, getMaximumAngleU, getMaximumAngleV, getMinimumAngleU, getMinimumAngleV, isClosedBottom, isClosedLeft, isClosedRight, isClosedTop, setClosedBottom, setClosedLeft, setClosedRight, setClosedTop, setMaximumAngleU, setMaximumAngleV, setMinimumAngleU, setMinimumAngleV
 
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, setSizeXYZ, 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.ElementEllipsoid
getMaximumAngleU, getMaximumAngleV, getMinimumAngleU, getMinimumAngleV, isClosedBottom, isClosedLeft, isClosedRight, isClosedTop, setClosedBottom, setClosedLeft, setClosedRight, setClosedTop, setMaximumAngleU, setMaximumAngleV, setMinimumAngleU, setMinimumAngleV
 
Methods inherited from interface org.opensourcephysics.display3d.core.Element
getDrawingPanel3D, getName, getSizeX, getSizeY, getSizeZ, getStyle, getTransformation, getX, getY, getZ, isVisible, loadUnmutableObjects, setName, setSizeXYZ, setTransformation, setVisible, setX, setXYZ, setXYZ, setY, setZ, toBodyFrame, toSpaceFrame
 
Methods inherited from interface org.opensourcephysics.display3d.core.interaction.InteractionSource
addInteractionListener, getInteractionTarget, removeInteractionListener
 

Constructor Detail

ElementSphere

public ElementSphere()
Constructor ElementSphere


ElementSphere

public ElementSphere(double radius)
Constructor ElementSphere

Parameters:
radius -
Method Detail

setRadius

public void setRadius(double radius)
Description copied from interface: ElementSphere
Sets the radius.

Specified by:
setRadius in interface ElementSphere
Parameters:
radius - the radius

getRadius

public double getRadius()
Description copied from interface: ElementSphere
Gets the radius

Specified by:
getRadius in interface ElementSphere
Returns:
the radius

setSizeX

public void setSizeX(double sizeX)
Description copied from interface: Element
Set the size along the X axis

Specified by:
setSizeX in interface Element
Overrides:
setSizeX in class Element
Parameters:
sizeX - double

setSizeY

public void setSizeY(double sizeY)
Description copied from interface: Element
Set the size along the Y axis

Specified by:
setSizeY in interface Element
Overrides:
setSizeY in class Element
Parameters:
sizeY - double

setSizeZ

public void setSizeZ(double sizeZ)
Description copied from interface: Element
Set the size along the Z axis

Specified by:
setSizeZ in interface Element
Overrides:
setSizeZ in class Element
Parameters:
sizeZ - double

setSizeXYZ

public void setSizeXYZ(double sizeX,
                       double sizeY,
                       double sizeZ)
Description copied from interface: Element
Set the size along the X, Y and Z axes

Specified by:
setSizeXYZ in interface Element
Overrides:
setSizeXYZ in class Element
Parameters:
sizeX - double
sizeY - double
sizeZ - double