Class MultiShape3i<T extends Shape3i<?>>
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d3.i.AbstractShape3i<MultiShape3i<T>>
-
- org.arakhne.afc.math.geometry.d3.i.MultiShape3i<T>
-
- Type Parameters:
T
- the type of the shapes inside the multishape.
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<T>
,Collection<T>
,List<T>
,MultiShape3ai<Shape3i<?>,MultiShape3i<T>,T,PathElement3i,Point3i,Vector3i,RectangularPrism3i>
,Shape3ai<Shape3i<?>,MultiShape3i<T>,PathElement3i,Point3i,Vector3i,RectangularPrism3i>
,Shape3i<MultiShape3i<T>>
,MultiShape3D<Shape3i<?>,MultiShape3i<T>,T,PathIterator3ai<PathElement3i>,Point3i,Vector3i,RectangularPrism3i>
,Shape3D<Shape3i<?>,MultiShape3i<T>,PathIterator3ai<PathElement3i>,Point3i,Vector3i,RectangularPrism3i>
,JsonableObject
public class MultiShape3i<T extends Shape3i<?>> extends AbstractShape3i<MultiShape3i<T>> implements MultiShape3ai<Shape3i<?>,MultiShape3i<T>,T,PathElement3i,Point3i,Vector3i,RectangularPrism3i>
Container for grouping of shapes.The coordinates of the shapes inside the multishape are global. They are not relative to the multishape.
Caution: The multishape does not detect the bound change of the stored shapes.
- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Thomas PIOTROWSKI, Stéphane GALLAND
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.arakhne.afc.math.geometry.d3.ai.MultiShape3ai
MultiShape3ai.AbstractMultiShapePathIterator<IE extends PathElement3ai>, MultiShape3ai.MultiShapePathIterator<IE extends PathElement3ai>, MultiShape3ai.MultiShapePointIterator<P extends Point3D<? super P,? super V>,V extends Vector3D<? super V,? super P>>, MultiShape3ai.TransformedMultiShapePathIterator<IE extends PathElement3ai>
-
Nested classes/interfaces inherited from interface org.arakhne.afc.math.geometry.d3.MultiShape3D
MultiShape3D.BackendIterator<CT extends Shape3D<?,?,?,?,?,?>>, MultiShape3D.BackendList<CT extends Shape3D<?,?,?,?,?,?>>
-
-
Constructor Summary
Constructors Constructor Description MultiShape3i()
Construct an empty multishape.MultiShape3i(Iterable<? extends T> shapes)
Construct a multishape with shapes inside.MultiShape3i(T... shapes)
Construct a multishape with shapes inside.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiShape3i<T>
clone()
Clone this shape.List<T>
getBackendDataList()
Replies the list that contains the backend data.int
hashCode()
void
onBackendDataChange()
Invoked each time the backend data has changed.protected void
onContentGeometryChange()
Invoked when the geometry of the content has changed.RectangularPrism3i
toBoundingBox()
Replies the bounding box of this shape.void
toBoundingBox(RectangularPrism3i box)
Replies the bounds of the shape.void
translate(int dx, int dy, int dz)
Translate the shape.-
Methods inherited from class org.arakhne.afc.math.geometry.d3.i.AbstractShape3i
addShapeGeometryChangeListener, equals, fireGeometryChange, getGeomFactory, removeShapeGeometryChangeListener, toJson, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
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, replaceAll, sort, spliterator
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.ai.MultiShape3ai
contains, contains, createTransformedShape, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getFirstShapeIntersecting, getPathIterator, getPointIterator, getShapesIntersecting, intersects, intersects, intersects, intersects, intersects
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.MultiShape3D
add, add, addAll, addAll, clear, contains, containsAll, equalsToShape, get, getClosestPointTo, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getFirstShapeContaining, getShapesContaining, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, 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, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.Shape3D
equalsToPathIterator, getDistance, getDistance, getPathIterator, operator_add, operator_and, operator_and, operator_minus, operator_multiply, operator_plus, operator_remove, operator_upTo
-
-
-
-
Constructor Detail
-
MultiShape3i
public MultiShape3i()
Construct an empty multishape.
-
MultiShape3i
public MultiShape3i(T... shapes)
Construct a multishape with shapes inside.- Parameters:
shapes
- the shapes to add into the multishape.
-
-
Method Detail
-
clone
public MultiShape3i<T> clone()
Description copied from interface:Shape3D
Clone this shape.- Specified by:
clone
in interfaceShape3D<Shape3i<?>,MultiShape3i<T extends Shape3i<?>>,PathIterator3ai<PathElement3i>,Point3i,Vector3i,RectangularPrism3i>
- Overrides:
clone
in classAbstractShape3i<MultiShape3i<T extends Shape3i<?>>>
- Returns:
- the clone.
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceCollection<T extends Shape3i<?>>
- Specified by:
hashCode
in interfaceList<T extends Shape3i<?>>
- Specified by:
hashCode
in classAbstractShape3i<MultiShape3i<T extends Shape3i<?>>>
-
onBackendDataChange
public void onBackendDataChange()
Description copied from interface:MultiShape3D
Invoked each time the backend data has changed.- Specified by:
onBackendDataChange
in interfaceMultiShape3D<Shape3i<?>,MultiShape3i<T extends Shape3i<?>>,T extends Shape3i<?>,PathIterator3ai<PathElement3i>,Point3i,Vector3i,RectangularPrism3i>
-
onContentGeometryChange
protected void onContentGeometryChange()
Invoked when the geometry of the content has changed.
-
getBackendDataList
@Pure public List<T> getBackendDataList()
Description copied from interface:MultiShape3D
Replies the list that contains the backend data.Use this function with caution. Indeed, any change made in the replied list has no consequence on the internal attributes of this multishape object.
- Specified by:
getBackendDataList
in interfaceMultiShape3D<Shape3i<?>,MultiShape3i<T extends Shape3i<?>>,T extends Shape3i<?>,PathIterator3ai<PathElement3i>,Point3i,Vector3i,RectangularPrism3i>
- Returns:
- the backend data list.
-
toBoundingBox
@Pure public RectangularPrism3i toBoundingBox()
Description copied from interface:Shape3D
Replies the bounding box of this shape.- Specified by:
toBoundingBox
in interfaceShape3ai<Shape3i<?>,MultiShape3i<T extends Shape3i<?>>,PathElement3i,Point3i,Vector3i,RectangularPrism3i>
- Specified by:
toBoundingBox
in interfaceShape3D<Shape3i<?>,MultiShape3i<T extends Shape3i<?>>,PathIterator3ai<PathElement3i>,Point3i,Vector3i,RectangularPrism3i>
- Returns:
- the bounding box of this shape.
-
toBoundingBox
@Pure public void toBoundingBox(RectangularPrism3i box)
Description copied from interface:Shape3D
Replies the bounds of the shape.- Specified by:
toBoundingBox
in interfaceMultiShape3ai<Shape3i<?>,MultiShape3i<T extends Shape3i<?>>,T extends Shape3i<?>,PathElement3i,Point3i,Vector3i,RectangularPrism3i>
- Specified by:
toBoundingBox
in interfaceShape3D<Shape3i<?>,MultiShape3i<T extends Shape3i<?>>,PathIterator3ai<PathElement3i>,Point3i,Vector3i,RectangularPrism3i>
- Parameters:
box
- is set with the bounds of the shape.
-
translate
public void translate(int dx, int dy, int dz)
Description copied from interface:Shape3ai
Translate the shape.- Specified by:
translate
in interfaceMultiShape3ai<Shape3i<?>,MultiShape3i<T extends Shape3i<?>>,T extends Shape3i<?>,PathElement3i,Point3i,Vector3i,RectangularPrism3i>
- Specified by:
translate
in interfaceShape3ai<Shape3i<?>,MultiShape3i<T extends Shape3i<?>>,PathElement3i,Point3i,Vector3i,RectangularPrism3i>
- Parameters:
dx
- x translation.dy
- y translation.dz
- z translation.
-
-