Class MultiShape2ifx<T extends Shape2ifx<?>>
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d2.ifx.AbstractShape2ifx<MultiShape2ifx<T>>
-
- org.arakhne.afc.math.geometry.d2.ifx.MultiShape2ifx<T>
-
- Type Parameters:
T
- the type of the shapes inside the multishape.
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<T>
,Collection<T>
,List<T>
,MultiShape2ai<Shape2ifx<?>,MultiShape2ifx<T>,T,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
,Shape2ai<Shape2ifx<?>,MultiShape2ifx<T>,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
,Shape2ifx<MultiShape2ifx<T>>
,MultiShape2D<Shape2ifx<?>,MultiShape2ifx<T>,T,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
,Shape2D<Shape2ifx<?>,MultiShape2ifx<T>,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
,JsonableObject
public class MultiShape2ifx<T extends Shape2ifx<?>> extends AbstractShape2ifx<MultiShape2ifx<T>> implements MultiShape2ai<Shape2ifx<?>,MultiShape2ifx<T>,T,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
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:49
- Author:
- Thomas PIOTROWSKI, Stéphane GALLAND
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.advanced
- Maven Artifact Id:
- mathfx
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.arakhne.afc.math.geometry.d2.ai.MultiShape2ai
MultiShape2ai.AbstractMultiShapePathIterator<IE extends PathElement2ai>, MultiShape2ai.MultiShapePathIterator<IE extends PathElement2ai>, MultiShape2ai.MultiShapePointIterator<P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>>, MultiShape2ai.TransformedMultiShapePathIterator<IE extends PathElement2ai>
-
Nested classes/interfaces inherited from interface org.arakhne.afc.math.geometry.d2.MultiShape2D
MultiShape2D.BackendIterator<CT extends Shape2D<?,?,?,?,?,?>>, MultiShape2D.BackendList<CT extends Shape2D<?,?,?,?,?,?>>
-
-
Field Summary
-
Fields inherited from class org.arakhne.afc.math.geometry.d2.ifx.AbstractShape2ifx
boundingBox
-
-
Constructor Summary
Constructors Constructor Description MultiShape2ifx()
Construct an empty multishape.MultiShape2ifx(Iterable<? extends T> shapes)
Construct a multishape with shapes inside.MultiShape2ifx(T... shapes)
Construct a multishape with shapes inside.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javafx.beans.property.ObjectProperty<Rectangle2ifx>
boundingBoxProperty()
Replies the property that contains the bounding box for this shape.MultiShape2ifx<T>
clone()
Clone this shape.javafx.beans.property.ListProperty<T>
elementsProperty()
Replies the property that contains all the shapes in this multishape.List<T>
getBackendDataList()
Replies the list that contains the backend data.int
hashCode()
Rectangle2ifx
toBoundingBox()
Replies the bounding box of this shape.void
toBoundingBox(Rectangle2ifx box)
Replies the bounds of the shape.-
Methods inherited from class org.arakhne.afc.math.geometry.d2.ifx.AbstractShape2ifx
equals, getGeomFactory, 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.d2.ai.MultiShape2ai
contains, contains, createTransformedShape, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getFirstShapeIntersecting, getFlatteningPathIterator, getPathIterator, getPointIterator, getShapesIntersecting, intersects, intersects, intersects, intersects, intersects, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.MultiShape2D
add, add, addAll, addAll, clear, contains, containsAll, equalsToShape, get, 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.d2.ai.Shape2ai
contains, contains, getClosestPointTo, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getGeomFactory, intersects, intersects, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.Shape2D
equalsToPathIterator, getDistance, getDistance, getPathIterator, operator_add, operator_and, operator_and, operator_minus, operator_multiply, operator_plus, operator_remove, operator_upTo
-
-
-
-
Constructor Detail
-
MultiShape2ifx
public MultiShape2ifx()
Construct an empty multishape.
-
MultiShape2ifx
public MultiShape2ifx(T... shapes)
Construct a multishape with shapes inside.- Parameters:
shapes
- the shapes to add into the multishape.
-
-
Method Detail
-
getBackendDataList
@Pure public List<T> getBackendDataList()
Description copied from interface:MultiShape2D
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 interfaceMultiShape2D<Shape2ifx<?>,MultiShape2ifx<T extends Shape2ifx<?>>,T extends Shape2ifx<?>,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Returns:
- the backend data list.
-
elementsProperty
public javafx.beans.property.ListProperty<T> elementsProperty()
Replies the property that contains all the shapes in this multishape.- Returns:
- the elements property.
-
boundingBoxProperty
public javafx.beans.property.ObjectProperty<Rectangle2ifx> boundingBoxProperty()
Description copied from interface:Shape2ifx
Replies the property that contains the bounding box for this shape.- Specified by:
boundingBoxProperty
in interfaceShape2ifx<T extends Shape2ifx<?>>
- Returns:
- the bounding box.
-
clone
public MultiShape2ifx<T> clone()
Description copied from interface:Shape2D
Clone this shape.- Specified by:
clone
in interfaceShape2D<Shape2ifx<?>,MultiShape2ifx<T extends Shape2ifx<?>>,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Overrides:
clone
in classAbstractShape2ifx<MultiShape2ifx<T extends Shape2ifx<?>>>
- Returns:
- the clone.
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceCollection<T extends Shape2ifx<?>>
- Specified by:
hashCode
in interfaceList<T extends Shape2ifx<?>>
- Specified by:
hashCode
in classAbstractShape2ifx<MultiShape2ifx<T extends Shape2ifx<?>>>
-
toBoundingBox
@Pure public Rectangle2ifx toBoundingBox()
Description copied from interface:Shape2D
Replies the bounding box of this shape.- Specified by:
toBoundingBox
in interfaceShape2ai<Shape2ifx<?>,MultiShape2ifx<T extends Shape2ifx<?>>,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Specified by:
toBoundingBox
in interfaceShape2D<Shape2ifx<?>,MultiShape2ifx<T extends Shape2ifx<?>>,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Returns:
- the bounding box of this shape.
-
toBoundingBox
@Pure public void toBoundingBox(Rectangle2ifx box)
Description copied from interface:Shape2D
Replies the bounds of the shape.- Specified by:
toBoundingBox
in interfaceMultiShape2ai<Shape2ifx<?>,MultiShape2ifx<T extends Shape2ifx<?>>,T extends Shape2ifx<?>,PathElement2ifx,Point2ifx,Vector2ifx,Rectangle2ifx>
- Specified by:
toBoundingBox
in interfaceShape2D<Shape2ifx<?>,MultiShape2ifx<T extends Shape2ifx<?>>,PathIterator2ai<PathElement2ifx>,Point2ifx,Vector2ifx,Rectangle2ifx>
- Parameters:
box
- is set with the bounds of the shape.
-
-