Interface Shape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Shape3afp<?,?,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
,Serializable
,Shape3D<ST,IT,PathIterator3afp<IE>,P,V,B>
- All Known Subinterfaces:
MultiShape3afp<ST,IT,CT,IE,P,V,B>
,Path3afp<ST,IT,IE,P,V,B>
,Prism3afp<ST,IT,IE,P,V,B>
,RectangularPrism3afp<ST,IT,IE,P,V,B>
,Segment3afp<ST,IT,IE,P,V,B>
,Shape3d<IT>
,Shape3dfx<IT>
,Sphere3afp<ST,IT,IE,P,V,B>
- All Known Implementing Classes:
AbstractShape3d
,AbstractShape3dfx
,MultiShape3d
,MultiShape3dfx
,Path3d
,Path3dfx
,RectangularPrism3d
,RectangularPrism3dfx
,Segment3d
,Segment3dfx
,SegmentPoint3d
,Sphere3d
,Sphere3dfx
public interface Shape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Shape3afp<?,?,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 Shape3D<ST,IT,PathIterator3afp<IE>,P,V,B>
2D shape with 2D floating coordinates.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
contains(double x, double y, double z)
Replies if the given point is inside this shape.boolean
contains(RectangularPrism3afp<?,?,?,?,?,?> rectangularPrism)
Replies if the given rectangular prism is inside this shape.default boolean
contains(Point3D<?,?> point)
Replies if the given point is inside this shape.default boolean
contains(Shape3D<?,?,?,?,?,?> shape)
Replies if the given shape is inside this shape.default ST
createTransformedShape(Transform3D transform)
Apply the transformation to the shape and reply the result.default P
getClosestPointTo(MultiShape3afp<?,?,?,?,?,?,?> multishape)
Replies the closest point on this shape to the given multishape.P
getClosestPointTo(Path3afp<?,?,?,?,?,?> path)
Replies the closest point on this shape to the given path.P
getClosestPointTo(RectangularPrism3afp<?,?,?,?,?,?> rectangularPrism)
Replies the closest point on this shape to the given rectangular prism.P
getClosestPointTo(Segment3afp<?,?,?,?,?,?> segment)
Replies the closest point on this shape to the given segment.P
getClosestPointTo(Sphere3afp<?,?,?,?,?,?> sphere)
Replies the closest point on this shape to the given sphere.default P
getClosestPointTo(Shape3D<?,?,?,?,?,?> shape)
Replies the point on the shape that is closest to the given shape.default double
getDistanceSquared(MultiShape3afp<?,?,?,?,?,?,?> multishape)
Replies the minimum distance between this shape and the given multishape.default double
getDistanceSquared(Path3afp<?,?,?,?,?,?> path)
Replies the minimum distance between this shape and the given path.default double
getDistanceSquared(RectangularPrism3afp<?,?,?,?,?,?> rectangularPrism)
Replies the minimum distance between this shape and the given rectangular prism.default double
getDistanceSquared(Segment3afp<?,?,?,?,?,?> segment)
Replies the minimum distance between this shape and the given segment.default double
getDistanceSquared(Sphere3afp<?,?,?,?,?,?> sphere)
Replies the minimum distance between this shape and the given sphere.default double
getDistanceSquared(Shape3D<?,?,?,?,?,?> shape)
Replies the squared value of the minimal distance from this shape to the given shape.GeomFactory3afp<IE,P,V,B>
getGeomFactory()
Replies the geometry factory associated to this point.boolean
intersects(MultiShape3afp<?,?,?,?,?,?,?> multishape)
Replies if this shape is intersecting the given multishape.default boolean
intersects(Path3afp<?,?,?,?,?,?> path)
Replies if this shape is intersecting the given path.boolean
intersects(PathIterator3afp<?> iterator)
Replies if this shape is intersecting the shape representing the given path iterator.boolean
intersects(RectangularPrism3afp<?,?,?,?,?,?> prism)
Replies if this shape is intersecting the given Prism.boolean
intersects(Segment3afp<?,?,?,?,?,?> segment)
Replies if this shape is intersecting the given line.boolean
intersects(Sphere3afp<?,?,?,?,?,?> sphere)
Replies if this shape is intersecting the given circle.default boolean
intersects(Shape3D<?,?,?,?,?,?> shape)
Replies if this shape is intersecting the given shape.default B
toBoundingBox()
Replies the bounding box of this shape.void
translate(double dx, double dy, double dz)
Translate the shape.default void
translate(Vector3D<?,?> vector)
Translate the shape.-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.Shape3D
clear, clone, equalsToPathIterator, equalsToShape, getClosestPointTo, getDistance, getDistance, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getPathIterator, getPathIterator, isEmpty, operator_add, operator_and, operator_and, operator_minus, operator_multiply, operator_plus, operator_remove, operator_upTo, set, toBoundingBox
-
-
-
-
Method Detail
-
contains
@Pure default boolean contains(Point3D<?,?> point)
Description copied from interface:Shape3D
Replies if the given point is inside this shape.- Specified by:
contains
in interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Shape3afp<?,?,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:
point
- the point to search for.- Returns:
true
if the given shape is intersecting this shape, otherwisefalse
.
-
contains
@Pure default boolean contains(Shape3D<?,?,?,?,?,?> shape)
Replies if the given shape is inside this shape.- Specified by:
contains
in interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Shape3afp<?,?,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 be inside.- Returns:
true
if the given shape is inside this shape, otherwisefalse
.- Since:
- 14.0
-
contains
@Pure boolean contains(RectangularPrism3afp<?,?,?,?,?,?> rectangularPrism)
Replies if the given rectangular prism is inside this shape.- Parameters:
rectangularPrism
- the rectangular prism.- Returns:
true
if the given rectangle is inside this shape, otherwisefalse
.
-
contains
@Pure boolean contains(double x, double y, double z)
Replies if the given point is inside this shape.- 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
.
-
translate
void translate(double dx, double dy, double dz)
Translate the shape.- Parameters:
dx
- x translation.dy
- y translation.dz
- z translation.
-
translate
@Pure default void translate(Vector3D<?,?> vector)
Description copied from interface:Shape3D
Translate the shape.- Specified by:
translate
in interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Shape3afp<?,?,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:
vector
- the translation vector
-
intersects
@Pure default boolean intersects(Shape3D<?,?,?,?,?,?> shape)
Description copied from interface:Shape3D
Replies if this shape is intersecting the given shape.You must use the intersection functions with a specific parameter type in place of this general function. Indeed, the implementation of this function is unefficient due to the tests against the types of the given shape, and the cast operators.
- Specified by:
intersects
in interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Shape3afp<?,?,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:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
@Pure boolean intersects(Sphere3afp<?,?,?,?,?,?> sphere)
Replies if this shape is intersecting the given circle.- Parameters:
sphere
- the sphere- Returns:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
@Pure boolean intersects(RectangularPrism3afp<?,?,?,?,?,?> prism)
Replies if this shape is intersecting the given Prism.- Parameters:
prism
- the prism- Returns:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
@Pure boolean intersects(Segment3afp<?,?,?,?,?,?> segment)
Replies if this shape is intersecting the given line.- 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(Path3afp<?,?,?,?,?,?> path)
Replies if this shape is intersecting the given path.- Parameters:
path
- the path- Returns:
true
if this shape is intersecting the given path;false
if there is no intersection.
-
intersects
@Pure boolean intersects(PathIterator3afp<?> iterator)
Replies if this shape is intersecting the shape representing the given path iterator.- Parameters:
iterator
- the iterator- Returns:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
@Pure boolean intersects(MultiShape3afp<?,?,?,?,?,?,?> multishape)
Replies if this shape is intersecting the given multishape.- Parameters:
multishape
- the multishape- Returns:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
getDistanceSquared
@Pure default double getDistanceSquared(Shape3D<?,?,?,?,?,?> shape)
Description copied from interface:Shape3D
Replies the squared value of the minimal distance from this shape to the given shape.- Specified by:
getDistanceSquared
in interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Shape3afp<?,?,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.- Returns:
- squared value of the minimal distance between this shape and the given shape.
-
getDistanceSquared
@Pure default double getDistanceSquared(Sphere3afp<?,?,?,?,?,?> sphere)
Replies the minimum distance between this shape and the given sphere.- Parameters:
sphere
- the sphere.- Returns:
- the minimum distance between the two shapes.
-
getDistanceSquared
@Pure default double getDistanceSquared(RectangularPrism3afp<?,?,?,?,?,?> rectangularPrism)
Replies the minimum distance between this shape and the given rectangular prism.- Parameters:
rectangularPrism
- the rectangular prism.- Returns:
- the minimum distance between the two shapes.
-
getDistanceSquared
@Pure default double getDistanceSquared(Segment3afp<?,?,?,?,?,?> segment)
Replies the minimum distance between this shape and the given segment.- Parameters:
segment
- the segment.- Returns:
- the minimum distance between the two shapes.
-
getDistanceSquared
@Pure default double getDistanceSquared(Path3afp<?,?,?,?,?,?> path)
Replies the minimum distance between this shape and the given path.- Parameters:
path
- the path.- Returns:
- the minimum distance between the two shapes.
-
getDistanceSquared
@Pure default double getDistanceSquared(MultiShape3afp<?,?,?,?,?,?,?> multishape)
Replies the minimum distance between this shape and the given multishape.- Parameters:
multishape
- the multishape.- Returns:
- the minimum distance between the two shapes.
-
getClosestPointTo
@Pure default P getClosestPointTo(Shape3D<?,?,?,?,?,?> shape)
Description copied from interface:Shape3D
Replies the point on the shape that is closest to the given shape.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:
getClosestPointTo
in interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Shape3afp<?,?,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.- Returns:
- the closest point on the shape.
-
getClosestPointTo
@Pure P getClosestPointTo(Sphere3afp<?,?,?,?,?,?> sphere)
Replies 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.
- Parameters:
sphere
- the sphere.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
@Pure P getClosestPointTo(RectangularPrism3afp<?,?,?,?,?,?> rectangularPrism)
Replies 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.
- Parameters:
rectangularPrism
- the rectangular prism.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
@Pure P getClosestPointTo(Segment3afp<?,?,?,?,?,?> segment)
Replies 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.
- Parameters:
segment
- the segment.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
@Pure P getClosestPointTo(Path3afp<?,?,?,?,?,?> path)
Replies 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.
- 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)
Replies 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.
- Parameters:
multishape
- the multishape.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getGeomFactory
GeomFactory3afp<IE,P,V,B> getGeomFactory()
Description copied from interface:Shape3D
Replies the geometry factory associated to this point.- Specified by:
getGeomFactory
in interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Shape3afp<?,?,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 factory.
-
createTransformedShape
@Pure default ST createTransformedShape(Transform3D transform)
Description copied from interface:Shape3D
Apply the transformation to the shape and reply the result. This function does not change the current shape.- Specified by:
createTransformedShape
in interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Shape3afp<?,?,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 shape.- Returns:
- the result of the transformation.
-
toBoundingBox
default B toBoundingBox()
Description copied from interface:Shape3D
Replies the bounding box of this shape.- Specified by:
toBoundingBox
in interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends Shape3afp<?,?,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 bounding box of this shape.
-
-