Interface MultiShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT 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 multishape.CT
- is the type of the shapes that are inside this multishape.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
,Collection<CT>
,Iterable<CT>
,JsonableObject
,List<CT>
,MultiShape3D<ST,IT,CT,PathIterator3afp<IE>,P,V,B>
,Serializable
,Shape3afp<ST,IT,IE,P,V,B>
,Shape3D<ST,IT,PathIterator3afp<IE>,P,V,B>
- All Known Implementing Classes:
MultiShape3d
,MultiShape3dfx
public interface MultiShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT 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 Shape3afp<ST,IT,IE,P,V,B>, MultiShape3D<ST,IT,CT,PathIterator3afp<IE>,P,V,B>
Container for grouping of shapes.The coordinates of the shapes inside the multishape are global. They are not relative to the multishape.
- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Thomas PIOTROWSKI, Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
MultiShape3afp.AbstractMultiShapePathIterator<IE extends PathElement3afp>
Abstract iterator on the path elements of the multishape.static class
MultiShape3afp.MultiShapePathIterator<IE extends PathElement3afp>
Iterator on the path elements of the multishape.static class
MultiShape3afp.TransformedMultiShapePathIterator<IE extends PathElement3afp>
Iterator on the path elements of the multishape.-
Nested classes/interfaces inherited from interface org.arakhne.afc.math.geometry.d3.MultiShape3D
MultiShape3D.BackendIterator<CT extends Shape3D<?,?,?,?,?,?>>, MultiShape3D.BackendList<CT extends Shape3D<?,?,?,?,?,?>>
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default boolean
contains(double x, double y, double z)
Replies if the given point is inside this shape.default boolean
contains(RectangularPrism3afp<?,?,?,?,?,?> rectangularPrism)
Replies if the given rectangular prism 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.default P
getClosestPointTo(Path3afp<?,?,?,?,?,?> path)
Replies the closest point on this shape to the given path.default P
getClosestPointTo(RectangularPrism3afp<?,?,?,?,?,?> rectangle)
Replies the closest point on this shape to the given rectangular prism.default P
getClosestPointTo(Segment3afp<?,?,?,?,?,?> segment)
Replies the closest point on this shape to the given segment.default P
getClosestPointTo(Sphere3afp<?,?,?,?,?,?> circle)
Replies the closest point on this shape to the given sphere.default CT
getFirstShapeIntersecting(ST shape)
Get the first shape in this multishape that is intersecting the given shape.default PathIterator3afp<IE>
getPathIterator(Transform3D transform)
Replies the elements of the paths.default List<CT>
getShapesIntersecting(ST shape)
Get the shapes in this multishape that are intersecting the given shape.default boolean
intersects(MultiShape3afp<?,?,?,?,?,?,?> multishape)
Replies if this shape is intersecting the given multishape.default boolean
intersects(PathIterator3afp<?> iterator)
Replies if this shape is intersecting the shape representing the given path iterator.default boolean
intersects(RectangularPrism3afp<?,?,?,?,?,?> prism)
Replies if this shape is intersecting the given Prism.default boolean
intersects(Segment3afp<?,?,?,?,?,?> segment)
Replies if this shape is intersecting the given line.default boolean
intersects(Sphere3afp<?,?,?,?,?,?> sphere)
Replies if this shape is intersecting the given circle.default void
toBoundingBox(B box)
Replies the bounds of the shape.default void
translate(double dx, double dy, double dz)
Translate the shape.-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.MultiShape3D
add, add, addAll, addAll, clear, contains, containsAll, equalsToShape, get, getBackendDataList, getClosestPointTo, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getFirstShapeContaining, getShapesContaining, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, onBackendDataChange, remove, remove, removeAll, retainAll, set, set, size, subList, toArray, toArray
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.afp.Shape3afp
contains, contains, 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
-
intersects
@Pure default boolean intersects(Sphere3afp<?,?,?,?,?,?> sphere)
Description copied from interface:Shape3afp
Replies if this shape is intersecting the given circle.- Specified by:
intersects
in interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT extends Shape3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- 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(RectangularPrism3afp<?,?,?,?,?,?> prism)
Description copied from interface:Shape3afp
Replies if this shape is intersecting the given Prism.- Specified by:
intersects
in interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT extends Shape3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- Parameters:
prism
- the prism- Returns:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
@Pure default boolean intersects(Segment3afp<?,?,?,?,?,?> segment)
Description copied from interface:Shape3afp
Replies if this shape is intersecting the given line.- Specified by:
intersects
in interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT extends Shape3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- 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(PathIterator3afp<?> iterator)
Description copied from interface:Shape3afp
Replies if this shape is intersecting the shape representing the given path iterator.- Specified by:
intersects
in interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT extends Shape3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- Parameters:
iterator
- the iterator- Returns:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
@Pure default boolean intersects(MultiShape3afp<?,?,?,?,?,?,?> multishape)
Description copied from interface:Shape3afp
Replies if this shape is intersecting the given multishape.- Specified by:
intersects
in interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT extends Shape3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- Parameters:
multishape
- the multishape- Returns:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
contains
@Pure default boolean contains(double x, double y, double z)
Description copied from interface:Shape3afp
Replies if the given point is inside this shape.- Specified by:
contains
in interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT extends Shape3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- 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(RectangularPrism3afp<?,?,?,?,?,?> rectangularPrism)
Description copied from interface:Shape3afp
Replies if the given rectangular prism is inside this shape.- Specified by:
contains
in interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT extends Shape3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- Parameters:
rectangularPrism
- the rectangular prism.- Returns:
true
if the given rectangle is inside this shape, otherwisefalse
.
-
translate
default void translate(double dx, double dy, double dz)
Description copied from interface:Shape3afp
Translate the shape.- Specified by:
translate
in interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT extends Shape3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- Parameters:
dx
- x translation.dy
- y translation.dz
- z translation.
-
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 interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT extends Shape3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- Specified by:
createTransformedShape
in interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT extends Shape3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- Parameters:
transform
- is the transformation to apply to the shape.- Returns:
- the result of the transformation.
-
getFirstShapeIntersecting
@Pure default CT getFirstShapeIntersecting(ST shape)
Description copied from interface:MultiShape3D
Get the first shape in this multishape that is intersecting the given shape.- Specified by:
getFirstShapeIntersecting
in interfaceMultiShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT 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 shape, or
null
if no shape intersecting the given shape.
-
getShapesIntersecting
@Pure default List<CT> getShapesIntersecting(ST shape)
Description copied from interface:MultiShape3D
Get the shapes in this multishape that are intersecting the given shape.- Specified by:
getShapesIntersecting
in interfaceMultiShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT 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 shapes, or an empty list.
-
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 Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT extends Shape3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- Parameters:
box
- is set with the bounds of the shape.
-
getPathIterator
default PathIterator3afp<IE> getPathIterator(Transform3D transform)
Description copied from interface:Shape3D
Replies the elements of the paths.- Specified by:
getPathIterator
in interfaceShape3D<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT extends Shape3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- Parameters:
transform
- is the transformation to apply to the path.- Returns:
- the elements of the path.
-
getClosestPointTo
default P getClosestPointTo(Sphere3afp<?,?,?,?,?,?> circle)
Description copied from interface:Shape3afp
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.
- Specified by:
getClosestPointTo
in interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT extends Shape3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- Parameters:
circle
- the sphere.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(Segment3afp<?,?,?,?,?,?> segment)
Description copied from interface:Shape3afp
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.
- Specified by:
getClosestPointTo
in interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT extends Shape3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- Parameters:
segment
- the segment.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(RectangularPrism3afp<?,?,?,?,?,?> rectangle)
Description copied from interface:Shape3afp
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.
- Specified by:
getClosestPointTo
in interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT extends Shape3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- Parameters:
rectangle
- the rectangular prism.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(Path3afp<?,?,?,?,?,?> path)
Description copied from interface:Shape3afp
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.
- Specified by:
getClosestPointTo
in interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT extends Shape3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- Parameters:
path
- the path.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(MultiShape3afp<?,?,?,?,?,?,?> multishape)
Description copied from interface:Shape3afp
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.
- Specified by:
getClosestPointTo
in interfaceShape3afp<ST extends Shape3afp<?,?,IE,P,V,B>,IT extends MultiShape3afp<?,?,CT,IE,P,V,B>,CT extends Shape3afp<?,?,IE,P,V,B>,IE extends PathElement3afp,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- Parameters:
multishape
- the multishape.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
-