|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.math3.geometry.partitioning.AbstractSubHyperplane<Euclidean2D,Euclidean1D> org.apache.commons.math3.geometry.euclidean.twod.SubLine
public class SubLine
This class represents a sub-hyperplane for Line
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.commons.math3.geometry.partitioning.SubHyperplane |
---|
SubHyperplane.SplitSubHyperplane<U extends Space> |
Constructor Summary | |
---|---|
SubLine(Hyperplane<Euclidean2D> hyperplane,
Region<Euclidean1D> remainingRegion)
Simple constructor. |
|
SubLine(Segment segment)
Create a sub-line from a segment. |
|
SubLine(Vector2D start,
Vector2D end)
Create a sub-line from two endpoints. |
Method Summary | |
---|---|
protected AbstractSubHyperplane<Euclidean2D,Euclidean1D> |
buildNew(Hyperplane<Euclidean2D> hyperplane,
Region<Euclidean1D> remainingRegion)
Build a sub-hyperplane from an hyperplane and a region. |
List<Segment> |
getSegments()
Get the endpoints of the sub-line. |
Vector2D |
intersection(SubLine subLine,
boolean includeEndPoints)
Get the intersection of the instance and another sub-line. |
Side |
side(Hyperplane<Euclidean2D> hyperplane)
Compute the relative position of the instance with respect to an hyperplane. |
SubHyperplane.SplitSubHyperplane<Euclidean2D> |
split(Hyperplane<Euclidean2D> hyperplane)
Split the instance in two parts by an hyperplane. |
Methods inherited from class org.apache.commons.math3.geometry.partitioning.AbstractSubHyperplane |
---|
applyTransform, copySelf, getHyperplane, getRemainingRegion, getSize, isEmpty, reunite |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SubLine(Hyperplane<Euclidean2D> hyperplane, Region<Euclidean1D> remainingRegion)
hyperplane
- underlying hyperplaneremainingRegion
- remaining region of the hyperplanepublic SubLine(Vector2D start, Vector2D end)
start
- start pointend
- end pointpublic SubLine(Segment segment)
segment
- single segment forming the sub-lineMethod Detail |
---|
public List<Segment> getSegments()
A subline may be any arbitrary number of disjoints segments, so the endpoints are provided as a list of endpoint pairs. Each element of the list represents one segment, and each segment contains a start point at index 0 and an end point at index 1. If the sub-line is unbounded in the negative infinity direction, the start point of the first segment will have infinite coordinates. If the sub-line is unbounded in the positive infinity direction, the end point of the last segment will have infinite coordinates. So a sub-line covering the whole line will contain just one row and both elements of this row will have infinite coordinates. If the sub-line is empty, the returned list will contain 0 segments.
public Vector2D intersection(SubLine subLine, boolean includeEndPoints)
This method is related to the intersection
method in the Line
class, but in addition
to compute the point along infinite lines, it also checks the point
lies on both sub-line ranges.
subLine
- other sub-line which may intersect instanceincludeEndPoints
- if true, endpoints are considered to belong to
instance (i.e. they are closed sets) and may be returned, otherwise endpoints
are considered to not belong to instance (i.e. they are open sets) and intersection
occurring on endpoints lead to null being returned
protected AbstractSubHyperplane<Euclidean2D,Euclidean1D> buildNew(Hyperplane<Euclidean2D> hyperplane, Region<Euclidean1D> remainingRegion)
buildNew
in class AbstractSubHyperplane<Euclidean2D,Euclidean1D>
hyperplane
- underlying hyperplaneremainingRegion
- remaining region of the hyperplane
public Side side(Hyperplane<Euclidean2D> hyperplane)
side
in interface SubHyperplane<Euclidean2D>
side
in class AbstractSubHyperplane<Euclidean2D,Euclidean1D>
hyperplane
- hyperplane to check instance against
Side.PLUS
, Side.MINUS
, Side.BOTH
,
Side.HYPER
public SubHyperplane.SplitSubHyperplane<Euclidean2D> split(Hyperplane<Euclidean2D> hyperplane)
split
in interface SubHyperplane<Euclidean2D>
split
in class AbstractSubHyperplane<Euclidean2D,Euclidean1D>
hyperplane
- splitting hyperplane
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |