Class ElementSphere
java.lang.Object
org.opensourcephysics.display3d.simple3d.Element
org.opensourcephysics.display3d.simple3d.AbstractTile
org.opensourcephysics.display3d.simple3d.ElementEllipsoid
org.opensourcephysics.display3d.simple3d.ElementSphere
- All Implemented Interfaces:
Element,ElementEllipsoid,ElementSphere,InteractionSource
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_RADIANSFields inherited from class org.opensourcephysics.display3d.simple3d.AbstractTile
corners, numberOfTilesFields inherited from class org.opensourcephysics.display3d.simple3d.Element
targetPosition, targetSizeFields inherited from interface org.opensourcephysics.display3d.core.Element
TARGET_POSITION, TARGET_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionConstructor ElementSphereElementSphere(double radius) Constructor ElementSphere -
Method Summary
Modifier and TypeMethodDescriptiondoubleGets the radiusvoidsetRadius(double radius) Sets the radius.voidsetSizeX(double sizeX) Set the size along the X axisvoidsetSizeXYZ(double sizeX, double sizeY, double sizeZ) Set the size along the X, Y and Z axesvoidsetSizeY(double sizeY) Set the size along the Y axisvoidsetSizeZ(double sizeZ) Set the size along the Z axisMethods 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, setMinimumAngleVMethods inherited from class org.opensourcephysics.display3d.simple3d.AbstractTile
getTargetHit, projectPoints, setColorBelowWhenEqual, setColorOriginAndDirection, setColorRegions, setCorners, setDrawQuickInteriorMethods 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, toSpaceFrameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, toSpaceFrameMethods inherited from interface org.opensourcephysics.display3d.core.ElementEllipsoid
getMaximumAngleU, getMaximumAngleV, getMinimumAngleU, getMinimumAngleV, isClosedBottom, isClosedLeft, isClosedRight, isClosedTop, setClosedBottom, setClosedLeft, setClosedRight, setClosedTop, setMaximumAngleU, setMaximumAngleV, setMinimumAngleU, setMinimumAngleVMethods inherited from interface org.opensourcephysics.display3d.core.interaction.InteractionSource
addInteractionListener, getInteractionTarget, removeInteractionListener
-
Constructor Details
-
ElementSphere
public ElementSphere()Constructor ElementSphere -
ElementSphere
public ElementSphere(double radius) Constructor ElementSphere- Parameters:
radius-
-
-
Method Details
-
setRadius
public void setRadius(double radius) Description copied from interface:ElementSphereSets the radius.- Specified by:
setRadiusin interfaceElementSphere- Parameters:
radius- the radius
-
getRadius
public double getRadius()Description copied from interface:ElementSphereGets the radius- Specified by:
getRadiusin interfaceElementSphere- Returns:
- the radius
-
setSizeX
public void setSizeX(double sizeX) Description copied from interface:ElementSet the size along the X axis -
setSizeY
public void setSizeY(double sizeY) Description copied from interface:ElementSet the size along the Y axis -
setSizeZ
public void setSizeZ(double sizeZ) Description copied from interface:ElementSet the size along the Z axis -
setSizeXYZ
public void setSizeXYZ(double sizeX, double sizeY, double sizeZ) Description copied from interface:ElementSet the size along the X, Y and Z axes- Specified by:
setSizeXYZin interfaceElement- Overrides:
setSizeXYZin classElement- Parameters:
sizeX- doublesizeY- doublesizeZ- double
-