Interface Shape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT 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 shape.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,JsonableObject,Serializable,Shape3D<ST,IT,PathIterator3ai<IE>,P,V,B>
- All Known Subinterfaces:
MultiShape3ai<ST,IT,CT,IE,P,V,B>,Path3ai<ST,IT,IE,P,V,B>,Prism3ai<ST,IT,IE,P,V,B>,RectangularPrism3ai<ST,IT,IE,P,V,B>,Segment3ai<ST,IT,IE,P,V,B>,Shape3i<IT>,Shape3ifx<IT>,Sphere3ai<ST,IT,IE,P,V,B>
- All Known Implementing Classes:
AbstractPrism3i,AbstractRectangularShape3ifx,AbstractShape3i,AbstractShape3ifx,MultiShape3i,MultiShape3ifx,Path3i,Path3ifx,RectangularPrism3i,RectangularPrism3ifx,Segment3i,Segment3ifx,SegmentPoint3i,Sphere3i,Sphere3ifx
public interface Shape3ai<ST extends Shape3ai<?,?,IE,P,V,B>,IT 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 Shape3D<ST,IT,PathIterator3ai<IE>,P,V,B>
3D shape with 3d integer coordinates.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleancontains(int x, int y, int z)Replies if the given point is inside this shape.booleancontains(RectangularPrism3ai<?,?,?,?,?,?> box)Replies if the given rectangle is inside this shape.default booleancontains(Point3D<?,?> point)Replies if the given point is inside this shape.default booleancontains(Shape3D<?,?,?,?,?,?> shape)Replies if this shape is inside the given shape.default STcreateTransformedShape(Transform3D transform)Apply the transformation to the shape and reply the result.default PgetClosestPointTo(MultiShape3ai<?,?,?,?,?,?,?> multishape)Replies the closest point on this shape to the given rectangle.PgetClosestPointTo(Path3ai<?,?,?,?,?,?> path)Replies the closest point on this shape to the given rectangle.PgetClosestPointTo(RectangularPrism3ai<?,?,?,?,?,?> rectangle)Replies the closest point on this shape to the given rectangle.PgetClosestPointTo(Segment3ai<?,?,?,?,?,?> segment)Replies the closest point on this shape to the given rectangle.PgetClosestPointTo(Sphere3ai<?,?,?,?,?,?> circle)Replies the closest point on this shape to the given rectangle.default PgetClosestPointTo(Shape3D<?,?,?,?,?,?> shape)Replies the point on the shape that is closest to the given shape.default doublegetDistanceSquared(MultiShape3ai<?,?,?,?,?,?,?> multishape)Replies the minimum distance between this shape and the given multishape.default doublegetDistanceSquared(Path3ai<?,?,?,?,?,?> path)Replies the minimum distance between this shape and the given path.default doublegetDistanceSquared(RectangularPrism3ai<?,?,?,?,?,?> rectangularPrism)Replies the minimum distance between this shape and the given rectangular prism.default doublegetDistanceSquared(Segment3ai<?,?,?,?,?,?> segment)Replies the minimum distance between this shape and the given segment.default doublegetDistanceSquared(Sphere3ai<?,?,?,?,?,?> sphere)Replies the minimum distance between this shape and the given sphere.default doublegetDistanceSquared(Shape3D<?,?,?,?,?,?> shape)Replies the squared value of the minimal distance from this shape to the given shape.GeomFactory3ai<IE,P,V,B>getGeomFactory()Replies the geometry factory associated to this point.Iterator<P>getPointIterator()Replies an iterator on the points covered by the perimeter of this shape.booleanintersects(MultiShape3ai<?,?,?,?,?,?,?> multishape)Replies if this shape is intersecting the given multishape.default booleanintersects(Path3ai<?,?,?,?,?,?> path)Replies if this shape is intersecting the given path.booleanintersects(PathIterator3ai<?> pathIterator)Replies if this shape is intersecting the path described by the given iterator.booleanintersects(RectangularPrism3ai<?,?,?,?,?,?> rectangularPrism)Replies if this shape is intersecting the given rectangular prism.booleanintersects(Segment3ai<?,?,?,?,?,?> segment)Replies if this shape is intersecting the given segment.booleanintersects(Sphere3ai<?,?,?,?,?,?> sphere)Replies if this shape is intersecting the given sphere.default booleanintersects(Shape3D<?,?,?,?,?,?> shape)Replies if this shape is intersecting the given shape.default BtoBoundingBox()Replies the bounding box of this shape.voidtranslate(int dx, int dy, int dz)Translate the shape.default voidtranslate(Vector3D<?,?> vector)Translate the shape.-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
Methods inherited from interface org.arakhne.afc.math.geometry.d3.Shape3D
clear, clone, equalsToPathIterator, equalsToShape, getClosestPointTo, getDistance, getDistance, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getPathIterator, getPathIterator, isEmpty, operator_add, operator_and, operator_and, operator_minus, operator_multiply, operator_plus, operator_remove, operator_upTo, set, toBoundingBox
-
-
-
-
Method Detail
-
getPointIterator
@Pure Iterator<P> getPointIterator()
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.
- Returns:
- an iterator on the points that are located at the perimeter of the shape.
-
contains
@Pure default boolean contains(Point3D<?,?> point)
Description copied from interface:Shape3DReplies if the given point is inside this shape.- Specified by:
containsin interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT 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:
point- the point to search for.- Returns:
trueif the given shape is intersecting this shape, otherwisefalse.
-
contains
@Pure boolean contains(int x, int y, int z)Replies if the given point is inside this shape.- 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:
trueif the given point is inside this shape, otherwisefalse.
-
contains
@Pure boolean contains(RectangularPrism3ai<?,?,?,?,?,?> box)
Replies if the given rectangle is inside this shape.- Parameters:
box- the rectangle to test.- Returns:
trueif the given box is inside the shape.
-
contains
@Pure default boolean contains(Shape3D<?,?,?,?,?,?> shape)
Description copied from interface:Shape3DReplies if this shape is inside the given shape.You must use the containing functions with a specific parameter type in place of this general function. Indeed, the implementation of this function is unefficient due to the tests against the types of the given shape, and the cast operators.
- Specified by:
containsin interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT 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 to compare to.- Returns:
trueif the given shape is inside this shape;falseotherwise.
-
translate
@Pure default void translate(Vector3D<?,?> vector)
Description copied from interface:Shape3DTranslate the shape.- Specified by:
translatein interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT 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:
vector- the translation vector
-
translate
void translate(int dx, int dy, int dz)Translate the shape.- Parameters:
dx- x translation.dy- y translation.dz- z translation.
-
toBoundingBox
@Pure default B toBoundingBox()
Description copied from interface:Shape3DReplies the bounding box of this shape.- Specified by:
toBoundingBoxin interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT 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>>- Returns:
- the bounding box of this shape.
-
intersects
@Pure default boolean intersects(Shape3D<?,?,?,?,?,?> shape)
Description copied from interface:Shape3DReplies if this shape is intersecting the given shape.You must use the intersection functions with a specific parameter type in place of this general function. Indeed, the implementation of this function is unefficient due to the tests against the types of the given shape, and the cast operators.
- Specified by:
intersectsin interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT 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 to compare to- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure boolean intersects(RectangularPrism3ai<?,?,?,?,?,?> rectangularPrism)
Replies if this shape is intersecting the given rectangular prism.- Parameters:
rectangularPrism- the rectangular prism.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure boolean intersects(Sphere3ai<?,?,?,?,?,?> sphere)
Replies if this shape is intersecting the given sphere.- Parameters:
sphere- the sphere- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure boolean intersects(Segment3ai<?,?,?,?,?,?> segment)
Replies if this shape is intersecting the given segment.- Parameters:
segment- the segment- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure boolean intersects(MultiShape3ai<?,?,?,?,?,?,?> multishape)
Replies if this shape is intersecting the given multishape.- Parameters:
multishape- the ùmultishape- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(Path3ai<?,?,?,?,?,?> path)
Replies if this shape is intersecting the given path.- Parameters:
path- the path- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure boolean intersects(PathIterator3ai<?> pathIterator)
Replies if this shape is intersecting the path described by the given iterator.- Parameters:
pathIterator- the path Iterator- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
getDistanceSquared
@Pure default double getDistanceSquared(Shape3D<?,?,?,?,?,?> shape)
Description copied from interface:Shape3DReplies the squared value of the minimal distance from this shape to the given shape.- Specified by:
getDistanceSquaredin interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT 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:
- squared value of the minimal distance between this shape and the given shape.
-
getDistanceSquared
@Pure default double getDistanceSquared(RectangularPrism3ai<?,?,?,?,?,?> rectangularPrism)
Replies the minimum distance between this shape and the given rectangular prism.- Parameters:
rectangularPrism- the rectangular prism.- Returns:
- the minimum distance between the two shapes.
-
getDistanceSquared
@Pure default double getDistanceSquared(Sphere3ai<?,?,?,?,?,?> sphere)
Replies the minimum distance between this shape and the given sphere.- Parameters:
sphere- the sphere- Returns:
- the minimum distance between the two shapes.
-
getDistanceSquared
@Pure default double getDistanceSquared(Segment3ai<?,?,?,?,?,?> segment)
Replies the minimum distance between this shape and the given segment.- Parameters:
segment- the segment.- Returns:
- the minimum distance between the two shapes.
-
getDistanceSquared
@Pure default double getDistanceSquared(MultiShape3ai<?,?,?,?,?,?,?> multishape)
Replies the minimum distance between this shape and the given multishape.- Parameters:
multishape- the multishape.- Returns:
- the minimum distance between the two shapes.
-
getDistanceSquared
@Pure default double getDistanceSquared(Path3ai<?,?,?,?,?,?> path)
Replies the minimum distance between this shape and the given path.- Parameters:
path- the path.- Returns:
- the minimum distance between the two shapes.
-
getClosestPointTo
@Pure default P getClosestPointTo(Shape3D<?,?,?,?,?,?> shape)
Description copied from interface:Shape3DReplies the point on the shape that is closest to the given shape.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT 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 closest point on the shape.
-
getClosestPointTo
@Pure P getClosestPointTo(RectangularPrism3ai<?,?,?,?,?,?> rectangle)
Replies the closest point on this shape to the given rectangle.- 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
@Pure P getClosestPointTo(Sphere3ai<?,?,?,?,?,?> circle)
Replies the closest point on this shape to the given rectangle.- 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
@Pure P getClosestPointTo(Segment3ai<?,?,?,?,?,?> segment)
Replies the closest point on this shape to the given rectangle.- 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
@Pure default P getClosestPointTo(MultiShape3ai<?,?,?,?,?,?,?> multishape)
Replies the closest point on this shape to the given rectangle.- 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
@Pure P getClosestPointTo(Path3ai<?,?,?,?,?,?> path)
Replies the closest point on this shape to the given rectangle.- 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.
-
getGeomFactory
GeomFactory3ai<IE,P,V,B> getGeomFactory()
Description copied from interface:Shape3DReplies the geometry factory associated to this point.- Specified by:
getGeomFactoryin interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT 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>>- Returns:
- the factory.
-
createTransformedShape
@Pure default ST createTransformedShape(Transform3D transform)
Description copied from interface:Shape3DApply the transformation to the shape and reply the result. This function does not change the current shape.- Specified by:
createTransformedShapein interfaceShape3D<ST extends Shape3ai<?,?,IE,P,V,B>,IT 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:
transform- is the transformation to apply to the shape.- Returns:
- the result of the transformation.
-
-