Interface Sphere3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,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,Prism3afp<ST,IT,IE,P,V,B>,Serializable,Shape3afp<ST,IT,IE,P,V,B>,Shape3D<ST,IT,PathIterator3afp<IE>,P,V,B>
- All Known Implementing Classes:
Sphere3d,Sphere3dfx
public interface Sphere3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>> extends Prism3afp<ST,IT,IE,P,V,B>
Fonctional interface that represented a 2D sphere on a plane.- 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 classSphere3afp.AbstractSpherePathIterator<T extends PathElement3afp>Abstract iterator on the path elements of the sphere.static classSphere3afp.SpherePathIterator<T extends PathElement3afp>Iterator on the path elements of the sphere.static classSphere3afp.TransformedCirclePathIterator<T extends PathElement3afp>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 voidclear()Reset this shape to be equivalent to an just-created instance of this shape type.default booleancontains(double x, double y, double z)Replies if the given point is inside this shape.default booleancontains(RectangularPrism3afp<?,?,?,?,?,?> rectangularPrism)Replies if the given rectangular prism is inside this shape.static booleancontainsSpherePoint(double cx, double cy, double cz, double radius, double px, double py, double pz)Replies if the given point is inside the given ellipse.static booleancontainsSphereRectangularPrism(double cx, double cy, double cz, double radius, double rxmin, double rymin, double rzmin, double rxmax, double rymax, double rzmax)Replies if a rectangular prism is inside in the sphere.default booleanequalsToShape(IT shape)Replies this shape is equal to the given shape.default PgetCenter()Replies the center.default PgetClosestPointTo(MultiShape3afp<?,?,?,?,?,?,?> multishape)Replies the closest point on this shape to the given multishape.default PgetClosestPointTo(Path3afp<?,?,?,?,?,?> path)Replies the closest point on this shape to the given path.default PgetClosestPointTo(RectangularPrism3afp<?,?,?,?,?,?> rectangularPrism)Replies the closest point on this shape to the given rectangular prism.default PgetClosestPointTo(Segment3afp<?,?,?,?,?,?> segment)Replies the closest point on this shape to the given segment.default PgetClosestPointTo(Sphere3afp<?,?,?,?,?,?> sphere)Replies the closest point on this shape to the given sphere.default PgetClosestPointTo(Point3D<?,?> pt)Replies the point on the shape that is closest to the given point.default doublegetDepth()Replies the depth.default doublegetDistance(Point3D<?,?> pt)Replies the minimal distance from this shape to the given point.default doublegetDistanceL1(Point3D<?,?> pt)Computes the L-1 (Manhattan) distance between this shape and point p1.default doublegetDistanceLinf(Point3D<?,?> pt)Computes the L-infinite distance between this shape and point p1.default doublegetDistanceSquared(Point3D<?,?> pt)Replies the squared value of the minimal distance from this shape to the given point.default PgetFarthestPointTo(Point3D<?,?> pt)Replies the point on the shape that is farthest the given point.default doublegetHeight()Replies the height.default doublegetMaxX()Replies the max x.default doublegetMaxY()Replies the max y.default doublegetMaxZ()Replies the max z.default doublegetMinX()Replies the min X.default doublegetMinY()Replies the min y.default doublegetMinZ()Replies the min z.default PathIterator3afp<IE>getPathIterator(Transform3D transform)Replies the elements of the paths.doublegetRadius()Replies the radius.default doublegetWidth()Replies the width.doublegetX()Replies the center X.doublegetY()Replies the center y.doublegetZ()Replies the center z.default booleanintersects(MultiShape3afp<?,?,?,?,?,?,?> multishape)Replies if this shape is intersecting the given multishape.default booleanintersects(PathIterator3afp<?> iterator)Replies if this shape is intersecting the shape representing the given path iterator.default booleanintersects(RectangularPrism3afp<?,?,?,?,?,?> prism)Replies if this shape is intersecting the given Prism.default booleanintersects(Segment3afp<?,?,?,?,?,?> segment)Replies if this shape is intersecting the given line.default booleanintersects(Sphere3afp<?,?,?,?,?,?> sphere)Replies if this shape is intersecting the given circle.static booleanintersectsSphereLine(double x1, double y1, double z1, double radius, double x2, double y2, double z2, double x3, double y3, double z3)Replies if a sphere and a line are intersecting.static booleanintersectsSpherePrism(double x1, double y1, double z1, double radius, double x2, double y2, double z2, double x3, double y3, double z3)Replies if a sphere and a rectangle are intersecting.static booleanintersectsSphereSegment(double x1, double y1, double z1, double radius, double x2, double y2, double z2, double x3, double y3, double z3)Replies if a sphere and a segment are intersecting.static booleanintersectsSphereSphere(double x1, double y1, double z1, double radius1, double x2, double y2, double z2, double radius2)Replies if two spheres are intersecting.default booleanisEmpty()Replies if this shape is empty.voidset(double x, double y, double z, double radius)Change the frame of the sphere.default voidset(IT shape)Set this shape with the attributes of the given shape.default voidset(Point3D<?,?> center, double radius)Change the frame of the sphere.default voidsetCenter(double x, double y, double z)Change the center.default voidsetCenter(Point3D<?,?> center)Change the center.default voidsetFromCenter(double centerX, double centerY, double centerZ, double cornerX, double cornerY, double cornerZ)Sets the framing rectangular prism of thisShapebased on the specified center point coordinates and corner point coordinates.default voidsetFromCorners(double x1, double y1, double z1, double x2, double y2, double z2)Change the frame of the rectangular prism conserving previous min and max if needed.default voidsetMaxX(double x)Set the max X conserving previous max if needed.default voidsetMaxY(double y)Set the max Y conserving previous max if needed.default voidsetMaxZ(double z)Set the max Z conserving previous max if needed.default voidsetMinX(double x)Set the min X conserving previous min if needed.default voidsetMinY(double y)Set the min Y conserving previous min if needed.default voidsetMinZ(double z)Set the min Z conserving previous min if needed.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.default voidtoBoundingBox(B box)Replies the bounds of the shape.default voidtranslate(double dx, double dy, double 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.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
-
-
-
-
Method Detail
-
containsSpherePoint
@Pure static boolean containsSpherePoint(double cx, double cy, double cz, double radius, double px, double py, double pz)Replies if the given point is inside the given ellipse.- Parameters:
px- is the point to test.py- is the point to test.pz- is the point to test.cx- is the center of the sphere.cy- is the center of the sphere.cz- is the center of the sphere.radius- is the radius of the sphere.- Returns:
trueif the point is inside the sphere;falseif not.
-
containsSphereRectangularPrism
@Pure static boolean containsSphereRectangularPrism(double cx, double cy, double cz, double radius, double rxmin, double rymin, double rzmin, double rxmax, double rymax, double rzmax)Replies if a rectangular prism is inside in the sphere.- Parameters:
cx- is the center of the sphere.cy- is the center of the sphere.cz- is the center of the sphere.radius- is the radius of the sphere.rxmin- is the lowest corner of the rectangle.rymin- is the lowest corner of the rectangle.rzmin- is the lowest corner of the rectangle.rxmax- is the uppest corner of the rectangle.rymax- is the uppest corner of the rectangle.rzmax- is the uppest corner of the rectangle.- Returns:
trueif the given rectangle is inside the sphere; otherwisefalse.
-
intersectsSphereSphere
@Pure static boolean intersectsSphereSphere(double x1, double y1, double z1, double radius1, double x2, double y2, double z2, double 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:
trueif the two shapes are intersecting; otherwisefalse
-
intersectsSpherePrism
@Pure static boolean intersectsSpherePrism(double x1, double y1, double z1, double radius, double x2, double y2, double z2, double x3, double y3, double 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:
trueif the two shapes are intersecting; otherwisefalse
-
intersectsSphereLine
@Pure static boolean intersectsSphereLine(double x1, double y1, double z1, double radius, double x2, double y2, double z2, double x3, double y3, double z3)Replies if a sphere and a line 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 line.y2- is the first point of the line.z2- is the first point of the line.x3- is the second point of the line.y3- is the second point of the line.z3- is the second point of the line.- Returns:
trueif the two shapes are intersecting; otherwisefalse
-
intersectsSphereSegment
@Pure static boolean intersectsSphereSegment(double x1, double y1, double z1, double radius, double x2, double y2, double z2, double x3, double y3, double 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:
trueif the two shapes are intersecting; otherwisefalse
-
equalsToShape
@Pure default boolean equalsToShape(IT shape)
Description copied from interface:Shape3DReplies this shape is equal to the given shape.- Specified by:
equalsToShapein interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
shape- the shape to compare to.- Returns:
trueif this shape is equal is equal to the given path.
-
getX
@Pure double getX()
Replies the center X.- Returns:
- the center x.
-
getY
@Pure double getY()
Replies the center y.- Returns:
- the center y.
-
getZ
@Pure double getZ()
Replies the center z.- Returns:
- the center z.
-
getCenter
@Pure default P getCenter()
Replies the center.- Specified by:
getCenterin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Returns:
- a copy of the center.
-
setCenter
default void setCenter(Point3D<?,?> center)
Change the center.- Specified by:
setCenterin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
center- the center point.
-
setCenter
default void setCenter(double x, double y, double z)Change the center.- Specified by:
setCenterin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
x- x coordinate of the center point.y- y coordinate of the center point.z- z coordinate of the center point.
-
setX
void setX(double x)
Change the x coordinate of the center.- Parameters:
x- x coordinate of the center point.
-
setY
void setY(double y)
Change the y coordinate of the center.- Parameters:
y- y coordinate of the center point.
-
setZ
void setZ(double z)
Change the z coordinate of the center.- Parameters:
z- z coordinate of the center point.
-
getRadius
@Pure double getRadius()
Replies the radius.- Returns:
- the radius.
-
setRadius
void setRadius(double radius)
Set the radius.- Parameters:
radius- is the radius.
-
set
void set(double x, double y, double z, double radius)Change the frame of the sphere.- 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.
-
set
default void set(Point3D<?,?> center, double radius)
Change the frame of the sphere.- Parameters:
center- the center point.radius- the radius.
-
set
default void set(IT shape)
Description copied from interface:Shape3DSet this shape with the attributes of the given shape.- Specified by:
setin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Specified by:
setin interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
shape- the shape.
-
clear
default void clear()
Description copied from interface:Shape3DReset this shape to be equivalent to an just-created instance of this shape type.- Specified by:
clearin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Specified by:
clearin interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>
-
toBoundingBox
default void toBoundingBox(B box)
Description copied from interface:Shape3DReplies the bounds of the shape.- Specified by:
toBoundingBoxin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Specified by:
toBoundingBoxin interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
box- is set with the bounds of the shape.
-
isEmpty
default boolean isEmpty()
Description copied from interface:Shape3DReplies if this shape is empty. The semantic associated to the state "empty" depends on the implemented shape. See the subclasses for details.- Specified by:
isEmptyin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Specified by:
isEmptyin interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Returns:
trueif the shape is empty;falseotherwise.
-
getDistance
@Pure default double getDistance(Point3D<?,?> pt)
Description copied from interface:Shape3DReplies the minimal distance from this shape to the given point.- Specified by:
getDistancein interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
pt- the point.- Returns:
- the minimal distance between this shape and the point.
-
getDistanceSquared
@Pure default double getDistanceSquared(Point3D<?,?> pt)
Description copied from interface:Shape3DReplies the squared value of the minimal distance from this shape to the given point.- Specified by:
getDistanceSquaredin interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,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:Shape3DComputes 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:
getDistanceL1in interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
pt- the point- Returns:
- the distance.
-
getDistanceLinf
@Pure default double getDistanceLinf(Point3D<?,?> pt)
Description copied from interface:Shape3DComputes 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:
getDistanceLinfin interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
pt- the point.- Returns:
- the distance.
-
contains
@Pure default boolean contains(double x, double y, double z)Description copied from interface:Shape3afpReplies if the given point is inside this shape.- Specified by:
containsin interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,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:
trueif the given point is inside this shape, otherwisefalse.
-
contains
default boolean contains(RectangularPrism3afp<?,?,?,?,?,?> rectangularPrism)
Description copied from interface:Shape3afpReplies if the given rectangular prism is inside this shape.- Specified by:
containsin interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
rectangularPrism- the rectangular prism.- Returns:
trueif the given rectangle is inside this shape, otherwisefalse.
-
translate
default void translate(double dx, double dy, double dz)Description copied from interface:Shape3afpTranslate the shape.- Specified by:
translatein interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Specified by:
translatein interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
dx- x translation.dy- y translation.dz- z translation.
-
intersects
@Pure default boolean intersects(RectangularPrism3afp<?,?,?,?,?,?> prism)
Description copied from interface:Shape3afpReplies if this shape is intersecting the given Prism.- Specified by:
intersectsin interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
prism- the prism- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(Sphere3afp<?,?,?,?,?,?> sphere)
Description copied from interface:Shape3afpReplies if this shape is intersecting the given circle.- Specified by:
intersectsin interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
sphere- the sphere- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(Segment3afp<?,?,?,?,?,?> segment)
Description copied from interface:Shape3afpReplies if this shape is intersecting the given line.- Specified by:
intersectsin interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
segment- the segment- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(PathIterator3afp<?> iterator)
Description copied from interface:Shape3afpReplies if this shape is intersecting the shape representing the given path iterator.- Specified by:
intersectsin interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
iterator- the iterator- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(MultiShape3afp<?,?,?,?,?,?,?> multishape)
Description copied from interface:Shape3afpReplies if this shape is intersecting the given multishape.- Specified by:
intersectsin interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
multishape- the multishape- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
getClosestPointTo
@Pure default P getClosestPointTo(Point3D<?,?> pt)
Description copied from interface:Shape3DReplies the point on the shape that is closest to the given point.- Specified by:
getClosestPointToin interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,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
@Pure default P getClosestPointTo(Sphere3afp<?,?,?,?,?,?> sphere)
Description copied from interface:Shape3afpReplies the closest point on this shape to the given sphere.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
sphere- the sphere.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
@Pure default P getClosestPointTo(RectangularPrism3afp<?,?,?,?,?,?> rectangularPrism)
Description copied from interface:Shape3afpReplies the closest point on this shape to the given rectangular prism.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
rectangularPrism- the rectangular prism.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
@Pure default P getClosestPointTo(Segment3afp<?,?,?,?,?,?> segment)
Description copied from interface:Shape3afpReplies the closest point on this shape to the given segment.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
segment- the segment.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
@Pure default P getClosestPointTo(Path3afp<?,?,?,?,?,?> path)
Description copied from interface:Shape3afpReplies the closest point on this shape to the given path.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
path- the path.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
@Pure default P getClosestPointTo(MultiShape3afp<?,?,?,?,?,?,?> multishape)
Description copied from interface:Shape3afpReplies the closest point on this shape to the given multishape.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
multishape- the multishape.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getFarthestPointTo
@Pure default P getFarthestPointTo(Point3D<?,?> pt)
Description copied from interface:Shape3DReplies the point on the shape that is farthest the given point.- Specified by:
getFarthestPointToin interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
pt- the point.- Returns:
- the farthest point on the shape.
-
getPathIterator
@Pure default PathIterator3afp<IE> getPathIterator(Transform3D transform)
Description copied from interface:Shape3DReplies the elements of the paths.- Specified by:
getPathIteratorin interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
transform- is the transformation to apply to the path.- Returns:
- the elements of the path.
-
getHeight
@Pure default double getHeight()
Description copied from interface:Prism3afpReplies the height.- Specified by:
getHeightin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Returns:
- the height.
-
getDepth
@Pure default double getDepth()
Description copied from interface:Prism3afpReplies the depth.- Specified by:
getDepthin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Returns:
- the depth.
-
getWidth
@Pure default double getWidth()
Description copied from interface:Prism3afpReplies the width.- Specified by:
getWidthin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Returns:
- the width.
-
setFromCenter
default void setFromCenter(double centerX, double centerY, double centerZ, double cornerX, double cornerY, double cornerZ)Sets the framing rectangular prism of thisShapebased on the specified center point coordinates and corner point coordinates. The framing rectangular prism is used by the subclasses ofRectangularShapeto define their geometry.The sphere is set in order to be enclosed inside the given box. It means that the center of the sphere is the center of the box, and the radius of the sphere is the minimum of the demi-width, demi-height and demi-depth.
- Specified by:
setFromCenterin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
centerX- the X coordinate of the specified center pointcenterY- the Y coordinate of the specified center pointcenterZ- the Z coordinate of the specified center pointcornerX- the X coordinate of the specified corner pointcornerY- the Y coordinate of the specified corner pointcornerZ- the Z coordinate of the specified corner point
-
setFromCorners
default void setFromCorners(double x1, double y1, double z1, double x2, double y2, double z2)Change the frame of the rectangular prism conserving previous min and max if needed.The sphere is set in order to be enclosed inside the given box. It means that the center of the sphere is the center of the box, and the radius of the sphere is the minimum of the demi-width and demi-height.
- Specified by:
setFromCornersin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
x1- is the coordinate of the first corner.y1- is the coordinate of the first corner.z1- is the coordinate of the first corner.x2- is the coordinate of the second corner.y2- is the coordinate of the second corner.z2- is the coordinate of the second corner.
-
getMinX
default double getMinX()
Description copied from interface:Prism3afpReplies the min X.- Specified by:
getMinXin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Returns:
- the min x.
-
setMinX
default void setMinX(double x)
Set the min X conserving previous min if needed.Assuming that the maximum X coordinate should not change, the center of the sphere is the point between the new minimum and the current maximum coordinates, and the radius of the sphere is set to the difference between the new minimum and center coordinates.
If the new minimum is greater than the current maximum, the coordinates are automatically swapped.
- Specified by:
setMinXin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
x- the min x.
-
getMaxX
default double getMaxX()
Description copied from interface:Prism3afpReplies the max x.- Specified by:
getMaxXin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Returns:
- the max x.
-
setMaxX
default void setMaxX(double x)
Set the max X conserving previous max if needed.Assuming that the minimum X coordinate should not change, the center of the sphere is the point between the new maximum and the current minimum coordinates, and the radius of the sphere is set to the difference between the new maximum and center coordinates.
If the new maximum is lower than the current minimum, the coordinates are automatically swapped.
- Specified by:
setMaxXin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
x- the max x.
-
getMinY
default double getMinY()
Description copied from interface:Prism3afpReplies the min y.- Specified by:
getMinYin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Returns:
- the min y.
-
setMinY
default void setMinY(double y)
Set the min Y conserving previous min if needed.Assuming that the maximum Y coordinate should not change, the center of the sphere is the point between the new minimum and the current maximum coordinates, and the radius of the sphere is set to the difference between the new minimum and center coordinates.
If the new minimum is greater than the current maximum, the coordinates are automatically swapped.
- Specified by:
setMinYin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
y- the min y.
-
getMaxY
default double getMaxY()
Description copied from interface:Prism3afpReplies the max y.- Specified by:
getMaxYin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Returns:
- the max y.
-
setMaxY
default void setMaxY(double y)
Set the max Y conserving previous max if needed.Assuming that the minimum Y coordinate should not change, the center of the sphere is the point between the new maximum and the current minimum coordinates, and the radius of the sphere is set to the difference between the new maximum and center coordinates.
If the new maximum is lower than the current minimum, the coordinates are automatically swapped.
- Specified by:
setMaxYin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
y- the max y.
-
getMinZ
default double getMinZ()
Description copied from interface:Prism3afpReplies the min z.- Specified by:
getMinZin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Returns:
- the min z.
-
setMinZ
default void setMinZ(double z)
Set the min Z conserving previous min if needed.Assuming that the maximum Z coordinate should not change, the center of the sphere is the point between the new minimum and the current maximum coordinates, and the radius of the sphere is set to the difference between the new minimum and center coordinates.
If the new minimum is greater than the current maximum, the coordinates are automatically swapped.
- Specified by:
setMinZin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
z- the min z.
-
getMaxZ
default double getMaxZ()
Description copied from interface:Prism3afpReplies the max z.- Specified by:
getMaxZin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Returns:
- the max z.
-
setMaxZ
default void setMaxZ(double z)
Set the max Z conserving previous max if needed.Assuming that the minimum Z coordinate should not change, the center of the sphere is the point between the new maximum and the current minimum coordinates, and the radius of the sphere is set to the difference between the new maximum and center coordinates.
If the new maximum is lower than the current minimum, the coordinates are automatically swapped.
- Specified by:
setMaxZin interfacePrism3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Sphere3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>,B extends RectangularPrism3afp<?,?,IE,P,V,B>>- Parameters:
z- the max z.
-
-