- java.lang.Object
-
- org.arakhne.afc.math.geometry.d3.d.AbstractShape3d<Sphere3d>
-
- org.arakhne.afc.math.geometry.d3.d.Sphere3d
-
- All Implemented Interfaces:
Serializable,Cloneable,Prism3afp<Shape3d<?>,Sphere3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>,Shape3afp<Shape3d<?>,Sphere3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>,Sphere3afp<Shape3d<?>,Sphere3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>,Shape3d<Sphere3d>,Shape3D<Shape3d<?>,Sphere3d,PathIterator3afp<PathElement3d>,Point3d,Vector3d,RectangularPrism3d>,JsonableObject
public class Sphere3d extends AbstractShape3d<Sphere3d> implements Sphere3afp<Shape3d<?>,Sphere3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
A sphere with 3 double precision floating-point numbers.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND, Hamza JAFFALI, Thomas PIOTROWSKI
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.arakhne.afc.math.geometry.d3.afp.Sphere3afp
Sphere3afp.AbstractSpherePathIterator<T extends PathElement3afp>, Sphere3afp.SpherePathIterator<T extends PathElement3afp>, Sphere3afp.TransformedCirclePathIterator<T extends PathElement3afp>
-
-
Constructor Summary
Constructors Constructor Description Sphere3d()Construct an empty circle.Sphere3d(double x, double y, double z, double radius)Construct a circle at the given position, and with the given radius.Sphere3d(Sphere3afp<?,?,?,?,?,?> sphere)Construct a sphere from a sphere.Sphere3d(Point3D<?,?> center, double radius)Construct a circle at the given position, and with the given radius.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetRadius()Replies the radius.doublegetX()Replies the center X.doublegetY()Replies the center y.doublegetZ()Replies the center z.inthashCode()voidset(double x, double y, double z, double radius)Change the frame of the sphere.voidsetRadius(double radius)Set the radius.voidsetX(double x)Change the x coordinate of the center.voidsetY(double y)Change the y coordinate of the center.voidsetZ(double z)Change the z coordinate of the center.-
Methods inherited from class org.arakhne.afc.math.geometry.d3.d.AbstractShape3d
addShapeGeometryChangeListener, clone, equals, fireGeometryChange, getGeomFactory, removeShapeGeometryChangeListener, toJson, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.afp.Prism3afp
getCenterX, getCenterY, getCenterZ, inflate, set, set, setCenterX, setCenterY, setCenterZ, setDepth, setFromCenter, setFromCorners, setHeight, setWidth
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.afp.Shape3afp
contains, contains, createTransformedShape, getClosestPointTo, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getGeomFactory, intersects, intersects, toBoundingBox, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.Shape3D
clone, equalsToPathIterator, getDistance, getPathIterator, operator_add, operator_and, operator_and, operator_minus, operator_multiply, operator_plus, operator_remove, operator_upTo
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.afp.Sphere3afp
clear, contains, contains, equalsToShape, getCenter, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getDepth, getDistance, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getHeight, getMaxX, getMaxY, getMaxZ, getMinX, getMinY, getMinZ, getPathIterator, getWidth, intersects, intersects, intersects, intersects, intersects, isEmpty, set, set, setCenter, setCenter, setFromCenter, setFromCorners, setMaxX, setMaxY, setMaxZ, setMinX, setMinY, setMinZ, toBoundingBox, translate
-
-
-
-
Constructor Detail
-
Sphere3d
public Sphere3d()
Construct an empty circle.
-
Sphere3d
public Sphere3d(Point3D<?,?> center, double radius)
Construct a circle at the given position, and with the given radius.- Parameters:
center- the center of the circle.radius- the radius of the circle.
-
Sphere3d
public Sphere3d(double x, double y, double z, double radius)Construct a circle at the given position, and with the given radius.- Parameters:
x- x coordinate of the center of the circle.y- y coordinate of the center of the circle.z- z coordinate of the center of the circle.radius- the radius of the circle.
-
Sphere3d
public Sphere3d(Sphere3afp<?,?,?,?,?,?> sphere)
Construct a sphere from a sphere.- Parameters:
sphere- the sphere to copy.
-
-
Method Detail
-
hashCode
@Pure public int hashCode()
- Specified by:
hashCodein classAbstractShape3d<Sphere3d>
-
getX
@Pure public double getX()
Description copied from interface:Sphere3afpReplies the center X.- Specified by:
getXin interfaceSphere3afp<Shape3d<?>,Sphere3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>- Returns:
- the center x.
-
getY
@Pure public double getY()
Description copied from interface:Sphere3afpReplies the center y.- Specified by:
getYin interfaceSphere3afp<Shape3d<?>,Sphere3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>- Returns:
- the center y.
-
getZ
@Pure public double getZ()
Description copied from interface:Sphere3afpReplies the center z.- Specified by:
getZin interfaceSphere3afp<Shape3d<?>,Sphere3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>- Returns:
- the center z.
-
setX
public void setX(double x)
Description copied from interface:Sphere3afpChange the x coordinate of the center.- Specified by:
setXin interfaceSphere3afp<Shape3d<?>,Sphere3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>- Parameters:
x- x coordinate of the center point.
-
setY
public void setY(double y)
Description copied from interface:Sphere3afpChange the y coordinate of the center.- Specified by:
setYin interfaceSphere3afp<Shape3d<?>,Sphere3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>- Parameters:
y- y coordinate of the center point.
-
setZ
public void setZ(double z)
Description copied from interface:Sphere3afpChange the z coordinate of the center.- Specified by:
setZin interfaceSphere3afp<Shape3d<?>,Sphere3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>- Parameters:
z- z coordinate of the center point.
-
getRadius
@Pure public double getRadius()
Description copied from interface:Sphere3afpReplies the radius.- Specified by:
getRadiusin interfaceSphere3afp<Shape3d<?>,Sphere3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>- Returns:
- the radius.
-
setRadius
public void setRadius(double radius)
Description copied from interface:Sphere3afpSet the radius.- Specified by:
setRadiusin interfaceSphere3afp<Shape3d<?>,Sphere3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>- Parameters:
radius- is the radius.
-
set
public void set(double x, double y, double z, double radius)Description copied from interface:Sphere3afpChange the frame of the sphere.- Specified by:
setin interfaceSphere3afp<Shape3d<?>,Sphere3d,PathElement3d,Point3d,Vector3d,RectangularPrism3d>- Parameters:
x- x coordinate of the center point.y- y coordinate of the center point.z- z coordinate of the center point.radius- the radius.
-
-