Interface MultiShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,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 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,PathIterator3ai<IE>,P,V,B>
,Serializable
,Shape3ai<ST,IT,IE,P,V,B>
,Shape3D<ST,IT,PathIterator3ai<IE>,P,V,B>
- All Known Implementing Classes:
MultiShape3i
,MultiShape3ifx
public interface MultiShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,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>, MultiShape3D<ST,IT,CT,PathIterator3ai<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
MultiShape3ai.AbstractMultiShapePathIterator<IE extends PathElement3ai>
Abstract iterator on the path elements of the multishape.static class
MultiShape3ai.MultiShapePathIterator<IE extends PathElement3ai>
Iterator on the path elements of the multishape.static class
MultiShape3ai.MultiShapePointIterator<P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
Iterator on the points of the multishape.static class
MultiShape3ai.TransformedMultiShapePathIterator<IE extends PathElement3ai>
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(int x, int y, int z)
Replies if the given point is inside this shape.default boolean
contains(RectangularPrism3ai<?,?,?,?,?,?> rectangularPrism)
Replies if the given rectangle is inside this shape.default ST
createTransformedShape(Transform3D transform)
Apply the transformation to the shape and reply the result.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 CT
getFirstShapeIntersecting(ST shape)
Get the first shape in this multishape that is intersecting the given shape.default PathIterator3ai<IE>
getPathIterator(Transform3D transform)
Replies the elements of the paths.default Iterator<P>
getPointIterator()
Replies an iterator on the points covered by the perimeter of this shape.default List<CT>
getShapesIntersecting(ST shape)
Get the shapes in this multishape that are intersecting the given shape.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.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 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.ai.Shape3ai
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(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 MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,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(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 MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- 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(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 MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,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(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 MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- 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 MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,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(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 MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,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(RectangularPrism3ai<?,?,?,?,?,?> rectangularPrism)
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 MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- Parameters:
rectangularPrism
- the rectangle to test.- Returns:
true
if the given box is inside the shape.
-
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 MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,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 interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- Specified by:
createTransformedShape
in interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,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 Shape3ai<?,?,IE,P,V,B>,IT extends MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,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.- 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 Shape3ai<?,?,IE,P,V,B>,IT extends MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,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.- 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 Shape3ai<?,?,IE,P,V,B>,IT extends MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,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 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 MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,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.
-
getPointIterator
default Iterator<P> getPointIterator()
Description copied from interface:Shape3ai
Replies an iterator on the points covered by the perimeter of this shape.The implementation of the iterator depends on the shape type. There is no warranty about the order of the points.
- Specified by:
getPointIterator
in interfaceShape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT extends MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- Returns:
- an iterator on the points that are located at the perimeter of 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 MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- 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 MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- 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 MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- 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 MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- 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 MultiShape3ai<?,?,CT,IE,P,V,B>,CT extends Shape3ai<?,?,IE,P,V,B>,IE extends PathElement3ai,P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>
- 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.
-
-