- java.lang.Object
-
- org.arakhne.afc.math.geometry.d3.i.AbstractShape3i<Sphere3i>
-
- org.arakhne.afc.math.geometry.d3.i.Sphere3i
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Shape3ai<Shape3i<?>,Sphere3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>
,Sphere3ai<Shape3i<?>,Sphere3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>
,Shape3i<Sphere3i>
,Shape3D<Shape3i<?>,Sphere3i,PathIterator3ai<PathElement3i>,Point3i,Vector3i,RectangularPrism3i>
,JsonableObject
public class Sphere3i extends AbstractShape3i<Sphere3i> implements Sphere3ai<Shape3i<?>,Sphere3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>
A circle with 2 integer numbers.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND
- 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.ai.Sphere3ai
Sphere3ai.AbstractCirclePathIterator<IE extends PathElement3ai>, Sphere3ai.SpherePathIterator<IE extends PathElement3ai>, Sphere3ai.SpherePerimeterIterator<P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>, Sphere3ai.TransformedCirclePathIterator<IE extends PathElement3ai>
-
-
Constructor Summary
Constructors Constructor Description Sphere3i()
Construct an empty sphere.Sphere3i(int x, int y, int z, int radius)
Construct a sphere at the given position and with the given radius.Sphere3i(Sphere3ai<?,?,?,?,?,?> sphere)
Construct a sphere from a sphere.Sphere3i(Point3D<?,?> center, int radius)
Construct a Sphere at the given position and with the given radius.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getRadius()
Replies the radius.int
getX()
Replies the center X.int
getY()
Replies the center y.int
getZ()
Replies the center z.int
hashCode()
void
set(int x, int y, int z, int radius)
Change the sphere.void
setRadius(int radius)
Change the radius.void
setX(int x)
Change the center X.void
setY(int y)
Change the center Y.void
setZ(int z)
Change the center Z.-
Methods inherited from class org.arakhne.afc.math.geometry.d3.i.AbstractShape3i
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.ai.Shape3ai
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, 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.ai.Sphere3ai
clear, contains, contains, equalsToShape, getCenter, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getPathIterator, getPointIterator, getPointIterator, intersects, intersects, intersects, intersects, intersects, isEmpty, set, set, setCenter, setCenter, toBoundingBox, translate
-
-
-
-
Constructor Detail
-
Sphere3i
public Sphere3i()
Construct an empty sphere.
-
Sphere3i
public Sphere3i(Point3D<?,?> center, int radius)
Construct a Sphere at the given position and with the given radius.- Parameters:
center
- the center position of the sphere.radius
- the radius of the sphere.
-
Sphere3i
public Sphere3i(int x, int y, int z, int radius)
Construct a sphere at the given position and with the given radius.- Parameters:
x
- x coordinate of the the center position of the sphere.y
- y coordinate of the the center position of the sphere.z
- z coordinate of the the center position of the sphere.radius
- the radius of the circle.
-
Sphere3i
public Sphere3i(Sphere3ai<?,?,?,?,?,?> sphere)
Construct a sphere from a sphere.- Parameters:
sphere
- the sphere to copy.
-
-
Method Detail
-
hashCode
@Pure public int hashCode()
- Specified by:
hashCode
in classAbstractShape3i<Sphere3i>
-
getX
@Pure public int getX()
Description copied from interface:Sphere3ai
Replies the center X.- Specified by:
getX
in interfaceSphere3ai<Shape3i<?>,Sphere3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>
- Returns:
- the center x.
-
getY
@Pure public int getY()
Description copied from interface:Sphere3ai
Replies the center y.- Specified by:
getY
in interfaceSphere3ai<Shape3i<?>,Sphere3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>
- Returns:
- the center y.
-
getZ
@Pure public int getZ()
Description copied from interface:Sphere3ai
Replies the center z.- Specified by:
getZ
in interfaceSphere3ai<Shape3i<?>,Sphere3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>
- Returns:
- the center z.
-
setX
public void setX(int x)
Description copied from interface:Sphere3ai
Change the center X.- Specified by:
setX
in interfaceSphere3ai<Shape3i<?>,Sphere3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>
- Parameters:
x
- the center x.
-
setY
public void setY(int y)
Description copied from interface:Sphere3ai
Change the center Y.- Specified by:
setY
in interfaceSphere3ai<Shape3i<?>,Sphere3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>
- Parameters:
y
- the center y.
-
setZ
public void setZ(int z)
Description copied from interface:Sphere3ai
Change the center Z.- Specified by:
setZ
in interfaceSphere3ai<Shape3i<?>,Sphere3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>
- Parameters:
z
- the center z.
-
getRadius
@Pure public int getRadius()
Description copied from interface:Sphere3ai
Replies the radius.- Specified by:
getRadius
in interfaceSphere3ai<Shape3i<?>,Sphere3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>
- Returns:
- the radius.
-
setRadius
public void setRadius(int radius)
Description copied from interface:Sphere3ai
Change the radius.- Specified by:
setRadius
in interfaceSphere3ai<Shape3i<?>,Sphere3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>
- Parameters:
radius
- the radius.
-
set
public void set(int x, int y, int z, int radius)
Description copied from interface:Sphere3ai
Change the sphere.- Specified by:
set
in interfaceSphere3ai<Shape3i<?>,Sphere3i,PathElement3i,Point3i,Vector3i,RectangularPrism3i>
- Parameters:
x
- the x coordinate of the center.y
- the y coordinate of the center.z
- the z coordinate of the center.radius
- the radius of the center.
-
-