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.int
hashCode()
void
onBackendDataChange()
Invoked each time the backend data has changed.protected void
onContentGeometryChange()
Invoked when the geometry of the content has changed.RectangularPrism3d
toBoundingBox()
Replies the bounding box of this shape.void
toBoundingBox(RectangularPrism3d box)
Replies the bounds of the shape.void
translate(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:Shape3D
Clone this shape.- Specified by:
clone
in interfaceShape3D<Shape3d<?>,MultiShape3d<T extends Shape3d<?>>,PathIterator3afp<PathElement3d>,Point3d,Vector3d,RectangularPrism3d>
- Overrides:
clone
in classAbstractShape3d<MultiShape3d<T extends Shape3d<?>>>
- Returns:
- the clone.
-
hashCode
@Pure public int hashCode()
- Specified by:
hashCode
in interfaceCollection<T extends Shape3d<?>>
- Specified by:
hashCode
in interfaceList<T extends Shape3d<?>>
- Specified by:
hashCode
in classAbstractShape3d<MultiShape3d<T extends Shape3d<?>>>
-
onBackendDataChange
public void onBackendDataChange()
Description copied from interface:MultiShape3D
Invoked each time the backend data has changed.- Specified by:
onBackendDataChange
in 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: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<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:Shape3D
Replies the bounding box of this shape.- Specified by:
toBoundingBox
in interfaceShape3afp<Shape3d<?>,MultiShape3d<T extends Shape3d<?>>,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
- Specified by:
toBoundingBox
in 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:Shape3D
Replies the bounds of the shape.- Specified by:
toBoundingBox
in interfaceMultiShape3afp<Shape3d<?>,MultiShape3d<T extends Shape3d<?>>,T extends Shape3d<?>,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
- Specified by:
toBoundingBox
in 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:Shape3afp
Translate the shape.- Specified by:
translate
in interfaceMultiShape3afp<Shape3d<?>,MultiShape3d<T extends Shape3d<?>>,T extends Shape3d<?>,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
- Specified by:
translate
in interfaceShape3afp<Shape3d<?>,MultiShape3d<T extends Shape3d<?>>,PathElement3d,Point3d,Vector3d,RectangularPrism3d>
- Parameters:
dx
- x translation.dy
- y translation.dz
- z translation.
-
-