Interface Sphere3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
-
- Type Parameters:
ST
- is the type of the general implementation.IT
- is the type of the implementation of this shape.IE
- is the type of the path elements.P
- is the type of the points.V
- is the type of the vectors.B
- is the type of the bounding boxes.
- All Superinterfaces:
Cloneable
,JsonableObject
,Serializable
,Shape3ai<ST,IT,IE,P,V,B>
,Shape3D<ST,IT,PathIterator3ai<IE>,P,V,B>
- All Known Implementing Classes:
Sphere3i
,Sphere3ifx
public interface Sphere3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>> extends Shape3ai<ST,IT,IE,P,V,B>
Fonctional interface that represented a 3D sphere.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND, Hamza JAFFALI
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Sphere3ai.AbstractCirclePathIterator<IE extends PathElement3ai>
Abstract iterator on the path elements of the sphere.static class
Sphere3ai.SpherePathIterator<IE extends PathElement3ai>
Iterator on the path elements of the sphere.static class
Sphere3ai.SpherePerimeterIterator<P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
Iterates on points on the perimeter of a sphere.static class
Sphere3ai.TransformedCirclePathIterator<IE extends PathElement3ai>
Iterator on the path elements of the sphere.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
clear()
Reset this shape to be equivalent to an just-created instance of this shape type.static void
computeClosestPointTo(int cx, int cy, int cz, int cr, int x, int y, int z, Point3D<?,?> result)
Replies the closest point in a sphere to a point.static void
computeFarthestPointTo(int cx, int cy, int cz, int cr, int x, int y, int z, Point3D<?,?> result)
Replies the farthest point in a sphere to a point.default boolean
contains(int x, int y, int z)
Replies if the given point is inside this shape.static boolean
contains(int cx, int cy, int cz, int cr, int x, int y, int z)
Replies if the given point is inside the sphere.static boolean
contains(int cx, int cy, int cz, int cr, int quadrant, int x, int y, int z)
Replies if the given point is inside the quadrant of the given sphere.default boolean
contains(RectangularPrism3ai<?,?,?,?,?,?> box)
Replies if the given rectangle is inside this shape.default boolean
equalsToShape(IT shape)
Replies this shape is equal to the given shape.default P
getCenter()
Replies the center.default P
getClosestPointTo(MultiShape3ai<?,?,?,?,?,?,?> multishape)
Replies the closest point on this shape to the given rectangle.default P
getClosestPointTo(Path3ai<?,?,?,?,?,?> path)
Replies the closest point on this shape to the given rectangle.default P
getClosestPointTo(RectangularPrism3ai<?,?,?,?,?,?> rectangle)
Replies the closest point on this shape to the given rectangle.default P
getClosestPointTo(Segment3ai<?,?,?,?,?,?> segment)
Replies the closest point on this shape to the given rectangle.default P
getClosestPointTo(Sphere3ai<?,?,?,?,?,?> circle)
Replies the closest point on this shape to the given rectangle.default P
getClosestPointTo(Point3D<?,?> pt)
Replies the point on the shape that is closest to the given point.default double
getDistanceL1(Point3D<?,?> pt)
Computes the L-1 (Manhattan) distance between this shape and point p1.default double
getDistanceLinf(Point3D<?,?> pt)
Computes the L-infinite distance between this shape and point p1.default double
getDistanceSquared(Point3D<?,?> pt)
Replies the squared value of the minimal distance from this shape to the given point.default P
getFarthestPointTo(Point3D<?,?> pt)
Replies the point on the shape that is farthest the given point.default PathIterator3ai<IE>
getPathIterator(Transform3D transform)
Replies the elements of the paths.default Iterator<P>
getPointIterator()
Replies the points of the sphere perimeters starting by the first octant.default Iterator<P>
getPointIterator(int firstOctantIndex, int nbOctants)
Replies the points of the sphere perimeters starting by the first octant.static <P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
Iterator<P>getPointIterator(int cx, int cy, int cz, int radius, int firstOctantIndex, int nbOctants, GeomFactory3ai<?,P,V,?> factory)
Replies the points of the sphere perimeters starting by the first octant.int
getRadius()
Replies the radius.int
getX()
Replies the center X.int
getY()
Replies the center y.int
getZ()
Replies the center z.default boolean
intersects(MultiShape3ai<?,?,?,?,?,?,?> multishape)
Replies if this shape is intersecting the given multishape.default boolean
intersects(PathIterator3ai<?> iterator)
Replies if this shape is intersecting the path described by the given iterator.default boolean
intersects(RectangularPrism3ai<?,?,?,?,?,?> rectangularPrism)
Replies if this shape is intersecting the given rectangular prism.default boolean
intersects(Segment3ai<?,?,?,?,?,?> segment)
Replies if this shape is intersecting the given segment.default boolean
intersects(Sphere3ai<?,?,?,?,?,?> sphere)
Replies if this shape is intersecting the given sphere.static boolean
intersectsSphereRectangularPrism(int x1, int y1, int z1, int radius, int x2, int y2, int z2, int x3, int y3, int z3)
Replies if a sphere and a rectangle are intersecting.static boolean
intersectsSphereSegment(int x1, int y1, int z1, int radius, int x2, int y2, int z2, int x3, int y3, int z3)
Replies if a sphere and a segment are intersecting.static boolean
intersectsSphereSphere(int x1, int y1, int z1, int radius1, int x2, int y2, int z2, int radius2)
Replies if two spheres are intersecting.default boolean
isEmpty()
Replies if this shape is empty.void
set(int x, int y, int z, int radius)
Change the sphere.default void
set(IT shape)
Set this shape with the attributes of the given shape.default void
set(Point3D<?,?> center, int radius)
Change the sphere.default void
setCenter(int x, int y, int z)
Change the sphere's center.default void
setCenter(Point3D<?,?> center)
Change the sphere's center.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.default void
toBoundingBox(B box)
Replies the bounds of the shape.default void
translate(int dx, int dy, int dz)
Translate the shape.-
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
-
-
-
-
Method Detail
-
contains
@Pure static boolean contains(int cx, int cy, int cz, int cr, int x, int y, int z)
Replies if the given point is inside the sphere.- Parameters:
cx
- is the x-coordinate of the sphere centercy
- is the y-coordinate of the sphere centercz
- is the z-coordinate of the sphere centercr
- is the radius of the sphere centerx
- is the x-coordinate of the pointy
- is the y-coordinate of the pointz
- is the z-coordinate of the point- Returns:
true
if the point is inside the sphere.
-
contains
@Pure static boolean contains(int cx, int cy, int cz, int cr, int quadrant, int x, int y, int z)
Replies if the given point is inside the quadrant of the given sphere.- Parameters:
cx
- is the x-coordinate of the sphere centercy
- is the y-coordinate of the sphere centercz
- is the z-coordinate of the sphere centercr
- is the radius of the sphere centerquadrant
- is the quadrant:quadrant x y 0 ≥cx ≥cy 1 ≥cx <cy 2 <cx ≥cy 3 <cx <cy x
- is the x-coordinate of the pointy
- is the y-coordinate of the pointz
- is the z-coordinate of the point- Returns:
true
if the point is inside the sphere.
-
contains
@Pure default boolean contains(int x, int y, int z)
Description copied from interface:Shape3ai
Replies if the given point is inside this shape.- Specified by:
contains
in interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
x
- x coordinate of the point to test.y
- y coordinate of the point to test.z
- z coordinate of the point to test.- Returns:
true
if the given point is inside this shape, otherwisefalse
.
-
contains
@Pure default boolean contains(RectangularPrism3ai<?,?,?,?,?,?> box)
Description copied from interface:Shape3ai
Replies if the given rectangle is inside this shape.- Specified by:
contains
in interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
box
- the rectangle to test.- Returns:
true
if the given box is inside the shape.
-
computeClosestPointTo
@Pure static void computeClosestPointTo(int cx, int cy, int cz, int cr, int x, int y, int z, Point3D<?,?> result)
Replies the closest point in a sphere to a point.The closest point is the point on the perimeter or inside the sphere's disk that has the lowest Manhatan distance to the given origin point.
- Parameters:
cx
- is the center of the spherecy
- is the center of the spherecz
- is the center of the spherecr
- is the radius of the spherex
- is the pointy
- is the pointz
- is the pointresult
- the closest point in the sphere to the point.
-
computeFarthestPointTo
@Pure static void computeFarthestPointTo(int cx, int cy, int cz, int cr, int x, int y, int z, Point3D<?,?> result)
Replies the farthest point in a sphere to a point.The farthest point is the point on the perimeter of the sphere that has the highest Manhatan distance to the given origin point.
- Parameters:
cx
- is the center of the spherecy
- is the center of the spherecz
- is the center of the spherecr
- is the radius of the spherex
- is the pointy
- is the pointz
- is the pointresult
- the farthest point in the sphere to the point.
-
intersectsSphereSphere
@Pure static boolean intersectsSphereSphere(int x1, int y1, int z1, int radius1, int x2, int y2, int z2, int radius2)
Replies if two spheres are intersecting.- Parameters:
x1
- is the center of the first spherey1
- is the center of the first spherez1
- is the center of the first sphereradius1
- is the radius of the first spherex2
- is the center of the second spherey2
- is the center of the second spherez2
- is the center of the second sphereradius2
- is the radius of the second sphere- Returns:
true
if the two shapes are intersecting; otherwisefalse
-
intersectsSphereRectangularPrism
@Pure static boolean intersectsSphereRectangularPrism(int x1, int y1, int z1, int radius, int x2, int y2, int z2, int x3, int y3, int z3)
Replies if a sphere and a rectangle are intersecting.- Parameters:
x1
- is the center of the spherey1
- is the center of the spherez1
- is the center of the sphereradius
- is the radius of the spherex2
- is the first corner of the rectangle.y2
- is the first corner of the rectangle.z2
- is the first corner of the rectangle.x3
- is the second corner of the rectangle.y3
- is the second corner of the rectangle.z3
- is the second corner of the rectangle.- Returns:
true
if the two shapes are intersecting; otherwisefalse
-
intersectsSphereSegment
static boolean intersectsSphereSegment(int x1, int y1, int z1, int radius, int x2, int y2, int z2, int x3, int y3, int z3)
Replies if a sphere and a segment are intersecting.- Parameters:
x1
- is the center of the spherey1
- is the center of the spherez1
- is the center of the sphereradius
- is the radius of the spherex2
- is the first point of the segment.y2
- is the first point of the segment.z2
- is the first point of the segment.x3
- is the second point of the segment.y3
- is the second point of the segment.z3
- is the second point of the segment.- Returns:
true
if the two shapes are intersecting; otherwisefalse
-
getPointIterator
@Pure static <P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>> Iterator<P> getPointIterator(int cx, int cy, int cz, int radius, int firstOctantIndex, int nbOctants, GeomFactory3ai<?,P,V,?> factory)
Replies the points of the sphere perimeters starting by the first octant.- Type Parameters:
P
- the type of the points.V
- the type of the vectors.- Parameters:
cx
- is the center of the radius.cy
- is the center of the radius.cz
- is the center of the radius.radius
- is the radius of the radius.firstOctantIndex
- is the index of the first octant to treat (value in [0;7].nbOctants
- is the number of octants to traverse (value in [0; 7 - firstOctantIndex].factory
- the factory to use for creating the points.- Returns:
- the points on the perimeters.
-
getPointIterator
@Pure default Iterator<P> getPointIterator()
Replies the points of the sphere perimeters starting by the first octant.- Specified by:
getPointIterator
in interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Returns:
- the points on the perimeters.
-
getPointIterator
@Pure default Iterator<P> getPointIterator(int firstOctantIndex, int nbOctants)
Replies the points of the sphere perimeters starting by the first octant.- Parameters:
firstOctantIndex
- is the index of the first octant (see figure) to treat.nbOctants
- is the number of octants to traverse (greater than zero).- Returns:
- the points on the perimeters.
-
equalsToShape
@Pure default boolean equalsToShape(IT shape)
Description copied from interface:Shape3D
Replies this shape is equal to the given shape.- Specified by:
equalsToShape
in interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
shape
- the shape to compare to.- Returns:
true
if this shape is equal is equal to the given path.
-
clear
default void clear()
Description copied from interface:Shape3D
Reset this shape to be equivalent to an just-created instance of this shape type.
-
isEmpty
@Pure default boolean isEmpty()
Description copied from interface:Shape3D
Replies if this shape is empty. The semantic associated to the state "empty" depends on the implemented shape. See the subclasses for details.- Specified by:
isEmpty
in interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Returns:
true
if the shape is empty;false
otherwise.
-
set
default void set(IT shape)
Description copied from interface:Shape3D
Set this shape with the attributes of the given shape.- Specified by:
set
in interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
shape
- the shape.
-
set
default void set(Point3D<?,?> center, int radius)
Change the sphere.- Parameters:
center
- the center of the sphere.radius
- the radius of the sphere.
-
set
void set(int x, int y, int z, int radius)
Change the sphere.- 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.
-
setCenter
default void setCenter(Point3D<?,?> center)
Change the sphere's center.- Parameters:
center
- the center of the sphere.
-
setCenter
default void setCenter(int x, int y, int z)
Change the sphere's center.- Parameters:
x
- x coordinate of the center of the sphere.y
- y coordinate of the center of the sphere.z
- z coordinate of the center of the sphere.
-
getX
@Pure int getX()
Replies the center X.- Returns:
- the center x.
-
setX
@Pure void setX(int x)
Change the center X.- Parameters:
x
- the center x.
-
getY
@Pure int getY()
Replies the center y.- Returns:
- the center y.
-
setY
@Pure void setY(int y)
Change the center Y.- Parameters:
y
- the center y.
-
getZ
@Pure int getZ()
Replies the center z.- Returns:
- the center z.
-
setZ
@Pure void setZ(int z)
Change the center Z.- Parameters:
z
- the center z.
-
getCenter
@Pure default P getCenter()
Replies the center.- Returns:
- a copy of the center.
-
getRadius
@Pure int getRadius()
Replies the radius.- Returns:
- the radius.
-
setRadius
@Pure void setRadius(int radius)
Change the radius.- Parameters:
radius
- the radius.
-
toBoundingBox
@Pure default void toBoundingBox(B box)
Description copied from interface:Shape3D
Replies the bounds of the shape.- Specified by:
toBoundingBox
in interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
box
- is set with the bounds of the shape.
-
getDistanceSquared
@Pure default double getDistanceSquared(Point3D<?,?> pt)
Description copied from interface:Shape3D
Replies the squared value of the minimal distance from this shape to the given point.- Specified by:
getDistanceSquared
in interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
pt
- the point.- Returns:
- squared value of the minimal distance between this shape and the point.
-
getDistanceL1
@Pure default double getDistanceL1(Point3D<?,?> pt)
Description copied from interface:Shape3D
Computes the L-1 (Manhattan) distance between this shape and point p1. The L-1 distance is equal to abs(x1-x2) + abs(y1-y2).- Specified by:
getDistanceL1
in interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
pt
- the point- Returns:
- the distance.
-
getDistanceLinf
@Pure default double getDistanceLinf(Point3D<?,?> pt)
Description copied from interface:Shape3D
Computes the L-infinite distance between this shape and point p1. The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2), abs(z1-z2)].- Specified by:
getDistanceLinf
in interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
pt
- the point.- Returns:
- the distance.
-
getClosestPointTo
@Pure default P getClosestPointTo(Point3D<?,?> pt)
Description copied from interface:Shape3D
Replies the point on the shape that is closest to the given point.- Specified by:
getClosestPointTo
in interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
pt
- the point.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(RectangularPrism3ai<?,?,?,?,?,?> rectangle)
Description copied from interface:Shape3ai
Replies the closest point on this shape to the given rectangle.- Specified by:
getClosestPointTo
in interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
rectangle
- the rectangle.- Returns:
- the closest point on this shape to the given shape; or the point if the point is in this shape.
-
getClosestPointTo
default P getClosestPointTo(Sphere3ai<?,?,?,?,?,?> circle)
Description copied from interface:Shape3ai
Replies the closest point on this shape to the given rectangle.- Specified by:
getClosestPointTo
in interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
circle
- the circle.- Returns:
- the closest point on this shape to the given shape; or the point if the point is in this shape.
-
getClosestPointTo
default P getClosestPointTo(Segment3ai<?,?,?,?,?,?> segment)
Description copied from interface:Shape3ai
Replies the closest point on this shape to the given rectangle.- Specified by:
getClosestPointTo
in interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
segment
- the segment.- Returns:
- the closest point on this shape to the given shape; or the point if the point is in this shape.
-
getClosestPointTo
default P getClosestPointTo(MultiShape3ai<?,?,?,?,?,?,?> multishape)
Description copied from interface:Shape3ai
Replies the closest point on this shape to the given rectangle.- Specified by:
getClosestPointTo
in interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
multishape
- the multishape.- Returns:
- the closest point on this shape to the given shape; or the point if the point is in this shape.
-
getClosestPointTo
default P getClosestPointTo(Path3ai<?,?,?,?,?,?> path)
Description copied from interface:Shape3ai
Replies the closest point on this shape to the given rectangle.- Specified by:
getClosestPointTo
in interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
path
- the path.- Returns:
- the closest point on this shape to the given shape; or the point if the point is in this shape.
-
getFarthestPointTo
@Pure default P getFarthestPointTo(Point3D<?,?> pt)
Description copied from interface:Shape3D
Replies the point on the shape that is farthest the given point.- Specified by:
getFarthestPointTo
in interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
pt
- the point.- Returns:
- the farthest point on the shape.
-
intersects
@Pure default boolean intersects(RectangularPrism3ai<?,?,?,?,?,?> rectangularPrism)
Description copied from interface:Shape3ai
Replies if this shape is intersecting the given rectangular prism.- Specified by:
intersects
in interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
rectangularPrism
- the rectangular prism.- Returns:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
@Pure default boolean intersects(Sphere3ai<?,?,?,?,?,?> sphere)
Description copied from interface:Shape3ai
Replies if this shape is intersecting the given sphere.- Specified by:
intersects
in interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
sphere
- the sphere- Returns:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
@Pure default boolean intersects(Segment3ai<?,?,?,?,?,?> segment)
Description copied from interface:Shape3ai
Replies if this shape is intersecting the given segment.- Specified by:
intersects
in interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
segment
- the segment- Returns:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
@Pure default boolean intersects(PathIterator3ai<?> iterator)
Description copied from interface:Shape3ai
Replies if this shape is intersecting the path described by the given iterator.- Specified by:
intersects
in interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
iterator
- the path Iterator- Returns:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
@Pure default boolean intersects(MultiShape3ai<?,?,?,?,?,?,?> multishape)
Description copied from interface:Shape3ai
Replies if this shape is intersecting the given multishape.- Specified by:
intersects
in interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
multishape
- the ùmultishape- Returns:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
translate
default void translate(int dx, int dy, int dz)
Description copied from interface:Shape3ai
Translate the shape.- Specified by:
translate
in interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
dx
- x translation.dy
- y translation.dz
- z translation.
-
getPathIterator
@Pure default PathIterator3ai<IE> getPathIterator(Transform3D transform)
Description copied from interface:Shape3D
Replies the elements of the paths.- Specified by:
getPathIterator
in interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends Sphere3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3ai<?,?,IE,P,V,B>>
- Parameters:
transform
- is the transformation to apply to the path.- Returns:
- the elements of the path.
-
-