Class MultiShape3d<T extends Shape3d<?>>
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d3.d.AbstractShape3d<MultiShape3d<T>>
-
- org.arakhne.afc.math.geometry.d3.d.MultiShape3d<T>
-
- Type Parameters:
T- the type of the shapes inside the multishape.
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<T>,Collection<T>,List<T>,MultiShape3afp<Shape3d<?>,MultiShape3d<T>,T,PathElement3d,Point3d,Vector3d,RectangularPrism3d>,Shape3afp<Shape3d<?>,MultiShape3d<T>,PathElement3d,Point3d,Vector3d,RectangularPrism3d>,Shape3d<MultiShape3d<T>>,MultiShape3D<Shape3d<?>,MultiShape3d<T>,T,PathIterator3afp<PathElement3d>,Point3d,Vector3d,RectangularPrism3d>,Shape3D<Shape3d<?>,MultiShape3d<T>,PathIterator3afp<PathElement3d>,Point3d,Vector3d,RectangularPrism3d>,JsonableObject
public class MultiShape3d<T extends Shape3d<?>> extends AbstractShape3d<MultiShape3d<T>> implements MultiShape3afp<Shape3d<?>,MultiShape3d<T>,T,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
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.afp.MultiShape3afp
MultiShape3afp.AbstractMultiShapePathIterator<IE extends PathElement3afp>, MultiShape3afp.MultiShapePathIterator<IE extends PathElement3afp>, MultiShape3afp.TransformedMultiShapePathIterator<IE extends PathElement3afp>
-
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 MultiShape3d()Construct an empty multishape.MultiShape3d(Iterable<? extends T> shapes)Construct a multishape with shapes inside.MultiShape3d(T... shapes)Construct a multishape with shapes inside.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiShape3d<T>clone()Clone this shape.List<T>getBackendDataList()Replies the list that contains the backend data.inthashCode()voidonBackendDataChange()Invoked each time the backend data has changed.protected voidonContentGeometryChange()Invoked when the geometry of the content has changed.RectangularPrism3dtoBoundingBox()Replies the bounding box of this shape.voidtoBoundingBox(RectangularPrism3d box)Replies the bounds of the shape.voidtranslate(double dx, double dy, double dz)Translate the shape.-
Methods inherited from class org.arakhne.afc.math.geometry.d3.d.AbstractShape3d
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.afp.MultiShape3afp
contains, contains, createTransformedShape, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getFirstShapeIntersecting, getPathIterator, 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.afp.Shape3afp
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
-
MultiShape3d
public MultiShape3d()
Construct an empty multishape.
-
MultiShape3d
public MultiShape3d(T... shapes)
Construct a multishape with shapes inside.- Parameters:
shapes- the shapes to add into the multishape.
-
-
Method Detail
-
clone
@Pure public MultiShape3d<T> clone()
Description copied from interface:Shape3DClone this shape.- Specified by:
clonein interfaceShape3D<Shape3d<?>,MultiShape3d<T extends Shape3d<?>>,PathIterator3afp<PathElement3d>,Point3d,Vector3d,RectangularPrism3d>- Overrides:
clonein classAbstractShape3d<MultiShape3d<T extends Shape3d<?>>>- Returns:
- the clone.
-
hashCode
@Pure public int hashCode()
- Specified by:
hashCodein interfaceCollection<T extends Shape3d<?>>- Specified by:
hashCodein interfaceList<T extends Shape3d<?>>- Specified by:
hashCodein classAbstractShape3d<MultiShape3d<T extends Shape3d<?>>>
-
onBackendDataChange
public void onBackendDataChange()
Description copied from interface:MultiShape3DInvoked each time the backend data has changed.- Specified by:
onBackendDataChangein interfaceMultiShape3D<Shape3d<?>,MultiShape3d<T extends Shape3d<?>>,T extends Shape3d<?>,PathIterator3afp<PathElement3d>,Point3d,Vector3d,RectangularPrism3d>
-
onContentGeometryChange
protected void onContentGeometryChange()
Invoked when the geometry of the content has changed.
-
getBackendDataList
@Pure public List<T> getBackendDataList()
Description copied from interface:MultiShape3DReplies 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:
getBackendDataListin interfaceMultiShape3D<Shape3d<?>,MultiShape3d<T extends Shape3d<?>>,T extends Shape3d<?>,PathIterator3afp<PathElement3d>,Point3d,Vector3d,RectangularPrism3d>- Returns:
- the backend data list.
-
toBoundingBox
@Pure public RectangularPrism3d toBoundingBox()
Description copied from interface:Shape3DReplies the bounding box of this shape.- Specified by:
toBoundingBoxin interfaceShape3afp<Shape3d<?>,MultiShape3d<T extends Shape3d<?>>,PathElement3d,Point3d,Vector3d,RectangularPrism3d>- Specified by:
toBoundingBoxin interfaceShape3D<Shape3d<?>,MultiShape3d<T extends Shape3d<?>>,PathIterator3afp<PathElement3d>,Point3d,Vector3d,RectangularPrism3d>- Returns:
- the bounding box of this shape.
-
toBoundingBox
@Pure public void toBoundingBox(RectangularPrism3d box)
Description copied from interface:Shape3DReplies the bounds of the shape.- Specified by:
toBoundingBoxin interfaceMultiShape3afp<Shape3d<?>,MultiShape3d<T extends Shape3d<?>>,T extends Shape3d<?>,PathElement3d,Point3d,Vector3d,RectangularPrism3d>- Specified by:
toBoundingBoxin interfaceShape3D<Shape3d<?>,MultiShape3d<T extends Shape3d<?>>,PathIterator3afp<PathElement3d>,Point3d,Vector3d,RectangularPrism3d>- Parameters:
box- is set with the bounds of the shape.
-
translate
public void translate(double dx, double dy, double dz)Description copied from interface:Shape3afpTranslate the shape.- Specified by:
translatein interfaceMultiShape3afp<Shape3d<?>,MultiShape3d<T extends Shape3d<?>>,T extends Shape3d<?>,PathElement3d,Point3d,Vector3d,RectangularPrism3d>- Specified by:
translatein interfaceShape3afp<Shape3d<?>,MultiShape3d<T extends Shape3d<?>>,PathElement3d,Point3d,Vector3d,RectangularPrism3d>- Parameters:
dx- x translation.dy- y translation.dz- z translation.
-
-