Uses of Class
org.apache.commons.geometry.euclidean.twod.Vector2D
-
Packages that use Vector2D Package Description org.apache.commons.geometry.euclidean.threed This package provides basic 3D geometry components.org.apache.commons.geometry.euclidean.twod This package provides basic 2D geometry components.org.apache.commons.geometry.euclidean.twod.path This package provides classes for working with connected sequences of line segments and other line subsets.org.apache.commons.geometry.euclidean.twod.rotation This package provides components related to rotations in 2 dimensional Euclidean space.org.apache.commons.geometry.euclidean.twod.shape This package provides utilities for constructing basic 2D shapes.org.apache.commons.geometry.spherical.oned This package provides basic geometry components on the 1-sphere. -
-
Uses of Vector2D in org.apache.commons.geometry.euclidean.threed
Methods in org.apache.commons.geometry.euclidean.threed that return Vector2D Modifier and Type Method Description Vector2D
AbstractEmbeddedRegionPlaneSubset. toSubspace(Vector3D pt)
Transform a space point into a subspace point.Vector2D
EmbeddingPlane. toSubspace(Vector3D point)
Transform a 3D space point into an in-plane point.Methods in org.apache.commons.geometry.euclidean.threed that return types with arguments of type Vector2D Modifier and Type Method Description HyperplaneBoundedRegion<Vector2D>
PlaneSubset.Embedded. getSubspaceRegion()
Get the embedded subspace region.Methods in org.apache.commons.geometry.euclidean.threed with parameters of type Vector2D Modifier and Type Method Description Vector3D
EmbeddingPlane. pointAt(Vector2D inPlane, double offset)
Get one point from the 3D-space.Vector3D
AbstractEmbeddedRegionPlaneSubset. toSpace(Vector2D pt)
Transform a subspace point into a space point.Vector3D
EmbeddingPlane. toSpace(Vector2D point)
Transform an in-plane point into a 3D space point.Method parameters in org.apache.commons.geometry.euclidean.threed with type arguments of type Vector2D Modifier and Type Method Description static java.util.List<PlaneConvexSubset>
Planes. extrudeVertexLoop(java.util.List<Vector2D> vertices, EmbeddingPlane plane, Vector3D extrusionVector, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Get the boundaries of a 3D region created by extruding a polygon defined by a list of vertices.(package private) static <T extends PlaneSubset>
Split<T>Planes. subspaceSplit(Plane splitter, T subset, java.util.function.BiFunction<? super EmbeddingPlane,? super HyperplaneBoundedRegion<Vector2D>,T> factory)
Generic split method that uses performs the split using the subspace region of the plane subset. -
Uses of Vector2D in org.apache.commons.geometry.euclidean.twod
Subclasses of Vector2D in org.apache.commons.geometry.euclidean.twod Modifier and Type Class Description static class
Vector2D.Unit
Represents unit vectors.Fields in org.apache.commons.geometry.euclidean.twod declared as Vector2D Modifier and Type Field Description private Vector2D
ReverseRay. endPoint
The end point of the reverse ray.private Vector2D
Segment. endPoint
End point for the segment.static Vector2D
Vector2D. NaN
A vector with all coordinates set to NaN.static Vector2D
Vector2D. NEGATIVE_INFINITY
A vector with all coordinates set to negative infinity.static Vector2D
Vector2D. POSITIVE_INFINITY
A vector with all coordinates set to positive infinity.private Vector2D
Ray. startPoint
The start point for the ray.private Vector2D
Segment. startPoint
Start point for the segment.static Vector2D
Vector2D. ZERO
Zero vector (coordinates: 0, 0).Fields in org.apache.commons.geometry.euclidean.twod with type parameters of type Vector2D Modifier and Type Field Description static java.util.Comparator<Vector2D>
Vector2D. COORDINATE_ASCENDING_ORDER
Comparator that sorts vectors in component-wise ascending order.Methods in org.apache.commons.geometry.euclidean.twod with type parameters of type Vector2D Modifier and Type Method Description private <T extends Vector2D>
TVector2D. getComponent(Vector2D base, boolean reject, DoubleFunction2N<T> factory)
Returns a component of the current instance relative to the given base vector.Methods in org.apache.commons.geometry.euclidean.twod that return Vector2D Modifier and Type Method Description Vector2D
Vector2D. add(double factor, Vector2D v)
Add a scaled vector to the instance.Vector2D
Vector2D. add(Vector2D v)
Add a vector to the instance.Vector2D
AffineTransformMatrix2D. apply(Vector2D pt)
Apply this transform to the given point, returning the result as a new instance.Vector2D
AffineTransformMatrix2D. applyVector(Vector2D vec)
Apply this transform to the given vector, ignoring translations.static Vector2D
Vector2D. centroid(java.lang.Iterable<Vector2D> pts)
Compute the centroid of the given points.static Vector2D
Vector2D. centroid(Vector2D first, Vector2D... more)
Compute the centroid of the given points.Vector2D
EmbeddedTreeLineSubset. closest(Vector2D pt)
Return the closest point to the argument that is contained in the subset (ie, not classified asoutside
), or null if no such point exists.Vector2D
LineConvexSubset. closest(Vector2D pt)
Return the closest point to the argument that is contained in the subset (ie, not classified asoutside
), or null if no such point exists.private static Vector2D
Vector2D. computeCentroid(Vector2D first, java.util.Iterator<? extends Vector2D> more)
Internal method for computing the centroid of a set of points.private static Vector2D
Vector2D. computeMax(Vector2D first, java.util.Iterator<? extends Vector2D> more)
Internal method for computing a max vector.private static Vector2D
Vector2D. computeMin(Vector2D first, java.util.Iterator<? extends Vector2D> more)
Internal method for computing a min vector.protected Vector2D
RegionBSPTree2D.BoundaryProjector2D. disambiguateClosestPoint(Vector2D target, Vector2D a, Vector2D b)
Method used to determine which of pointsa
andb
should be considered as the "closest" point totarget
when the points are exactly equidistant.Vector2D
Vector2D.Sum. get()
Vector2D
ConvexArea. getCentroid()
Get the centroid, or geometric center, of the region or null if no centroid exists or one exists but is not unique.Vector2D
EmbeddedTreeLineSubset. getCentroid()
Get the centroid, or geometric center, of the hyperplane subset or null if no centroid exists or one exists but is not unique.Vector2D
LineSpanningSubset. getCentroid()
Get the centroid, or geometric center, of the hyperplane subset or null if no centroid exists or one exists but is not unique.Vector2D
Ray. getCentroid()
Get the centroid, or geometric center, of the hyperplane subset or null if no centroid exists or one exists but is not unique.Vector2D
ReverseRay. getCentroid()
Get the centroid, or geometric center, of the hyperplane subset or null if no centroid exists or one exists but is not unique.Vector2D
Segment. getCentroid()
Get the centroid, or geometric center, of the hyperplane subset or null if no centroid exists or one exists but is not unique.Vector2D
Ray. getDirection()
Get the direction of the ray.abstract Vector2D
LineConvexSubset. getEndPoint()
Get the end point for the subset.Vector2D
LineSpanningSubset. getEndPoint()
Get the end point for the subset.Vector2D
Ray. getEndPoint()
Get the end point for the subset.Vector2D
ReverseRay. getEndPoint()
Get the end point for the subset.Vector2D
Segment. getEndPoint()
Get the end point for the subset.Vector2D
Line. getOffsetDirection()
Get the offset direction of the line.Vector2D
Line. getOrigin()
Get the line origin point.abstract Vector2D
LineConvexSubset. getStartPoint()
Get the start point for the subset.Vector2D
LineSpanningSubset. getStartPoint()
Get the start point for the subset.Vector2D
Ray. getStartPoint()
Vector2D
ReverseRay. getStartPoint()
Get the start point for the subset.Vector2D
Segment. getStartPoint()
Get the start point for the subset.Vector2D
Vector2D. getZero()
Get the zero (null) vector of the space.Vector2D
Line. intersection(Line other)
Get the intersection point of the instance and another line.Vector2D
LineSubset. intersection(Line inputLine)
Get the unique intersection of this subset with the given line.Vector2D
LineSubset. intersection(LineSubset subset)
Get the unique intersection of this instance with the given line subset.Vector2D
Vector2D. lerp(Vector2D p, double t)
Get a vector constructed by linearly interpolating between this vector and the given vector.static Vector2D
Vector2D. max(java.lang.Iterable<Vector2D> vecs)
Return a vector containing the maximum component values from all input vectors.static Vector2D
Vector2D. max(Vector2D first, Vector2D... more)
Return a vector containing the maximum component values from all input vectors.static Vector2D
Vector2D. min(java.lang.Iterable<Vector2D> vecs)
Return a vector containing the minimum component values from all input vectors.static Vector2D
Vector2D. min(Vector2D first, Vector2D... more)
Return a vector containing the minimum component values from all input vectors.Vector2D
Vector2D. multiply(double a)
Multiply the instance by a scalar.Vector2D
Vector2D. negate()
Get the negation of the instance.static Vector2D
Vector2D. of(double[] v)
Creates a vector from the coordinates in the given 2-element array.static Vector2D
Vector2D. of(double x, double y)
Returns a vector with the given coordinate values.static Vector2D
Vector2D. parse(java.lang.String str)
Parses the given string and returns a new vector instance.Vector2D
Line. pointAt(double abscissa, double offset)
Get one point from the plane, relative to the coordinate system of the line.Vector2D
Line. project(Vector2D point)
Project a point onto this instance.Vector2D
RegionBSPTree2D. project(Vector2D pt)
Project a point onto the boundary of the region.Vector2D
Vector2D. project(Vector2D base)
Get the projection of the instance onto the given base vector.Vector2D
Vector2D. reject(Vector2D base)
Get the rejection of the instance from the given base vector.Vector2D
Vector2D. subtract(double factor, Vector2D v)
Subtract a scaled vector from the instance.Vector2D
Vector2D. subtract(Vector2D v)
Subtract a vector from the instance.Vector2D
PolarCoordinates. toCartesian()
Convert this set of polar coordinates to Cartesian coordinates.static Vector2D
PolarCoordinates. toCartesian(double radius, double azimuth)
Convert the given polar coordinates to Cartesian form.Vector2D
Line. toSpace(double abscissa)
Convert the given abscissa value (1D location on the line) into a 2D point.Vector2D
Line. toSpace(Vector1D point)
Transform a subspace point into a space point.Vector2D
LineSubset. toSpace(Vector1D pt)
Transform a subspace point into a space point.Vector2D
Vector2D. transform(java.util.function.UnaryOperator<Vector2D> fn)
Convenience method to apply a function to this vector.Vector2D
Vector2D. vectorTo(Vector2D v)
Return the vector representing the displacement from this vector to the given vector.Vector2D
Vector2D.Unit. withNorm(double mag)
Returns a vector with the same direction but with the given norm.Vector2D
Vector2D. withNorm(double magnitude)
Returns a vector with the same direction but with the given norm.Methods in org.apache.commons.geometry.euclidean.twod that return types with arguments of type Vector2D Modifier and Type Method Description protected AbstractRegionBSPTree.RegionSizeProperties<Vector2D>
RegionBSPTree2D. computeRegionSizeProperties()
Compute the size-related properties of the region.java.util.List<Vector2D>
ConvexArea. getVertices()
Get the vertices for the area in a counter-clockwise order.Methods in org.apache.commons.geometry.euclidean.twod with parameters of type Vector2D Modifier and Type Method Description double
Line. abscissa(Vector2D point)
Get the abscissa of the given point on the line.Bounds2D.Builder
Bounds2D.Builder. add(Vector2D pt)
Add a point to this instance.Vector2D
Vector2D. add(double factor, Vector2D v)
Add a scaled vector to the instance.Vector2D
Vector2D. add(Vector2D v)
Add a vector to the instance.Vector2D.Sum
Vector2D.Sum. add(Vector2D vec)
Add a vector to this instance.Vector2D.Sum
Vector2D.Sum. addScaled(double scale, Vector2D vec)
Add a scaled vector to this instance.double
Vector2D. angle(Vector2D v)
Compute the angular separation between two vectors in radians.Vector2D
AffineTransformMatrix2D. apply(Vector2D pt)
Apply this transform to the given point, returning the result as a new instance.Vector2D.Unit
AffineTransformMatrix2D. applyDirection(Vector2D vec)
Apply this transform to the given vector, ignoring translations and normalizing the result.Vector2D
AffineTransformMatrix2D. applyVector(Vector2D vec)
Apply this transform to the given vector, ignoring translations.private <T> T
AffineTransformMatrix2D. applyVector(Vector2D vec, DoubleFunction2N<T> factory)
Multiplies the given vector by the 2x2 linear transformation matrix contained in the upper-right corner of the affine transformation matrix.static Vector2D
Vector2D. centroid(Vector2D first, Vector2D... more)
Compute the centroid of the given points.RegionLocation
LineSubset. classify(Vector2D pt)
Classify a point with respect to the subset region.Vector2D
EmbeddedTreeLineSubset. closest(Vector2D pt)
Return the closest point to the argument that is contained in the subset (ie, not classified asoutside
), or null if no such point exists.Vector2D
LineConvexSubset. closest(Vector2D pt)
Return the closest point to the argument that is contained in the subset (ie, not classified asoutside
), or null if no such point exists.private static Vector2D
Vector2D. computeCentroid(Vector2D first, java.util.Iterator<? extends Vector2D> more)
Internal method for computing the centroid of a set of points.private LinecastPoint2D
RegionBSPTree2D.LinecastVisitor. computeLinecastPoint(Vector2D pt, RegionBSPTree2D.RegionNode2D node)
Compute the linecast point for the given intersection point and tree node, returning null if the point does not actually lie on the region boundary.private static Vector2D
Vector2D. computeMax(Vector2D first, java.util.Iterator<? extends Vector2D> more)
Internal method for computing a max vector.private static Vector2D
Vector2D. computeMin(Vector2D first, java.util.Iterator<? extends Vector2D> more)
Internal method for computing a min vector.boolean
Bounds2D. contains(Vector2D pt)
Return true if the given point is strictly within or on the boundary of the bounding box.boolean
Bounds2D. contains(Vector2D pt, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Return true if the given point is within or on the boundary of the bounding box, using the given precision context for floating point comparisons.boolean
Line. contains(Vector2D p)
Check if the line contains a point.static AffineTransformMatrix2D
AffineTransformMatrix2D. createRotation(Vector2D center, double angle)
Create a transform representing a counterclockwise rotation ofangle
radians around the given center point.static AffineTransformMatrix2D
AffineTransformMatrix2D. createRotation(Vector2D center, Rotation2D rotation)
Create a transform representing a counterclockwise rotation around the given center point.static AffineTransformMatrix2D
AffineTransformMatrix2D. createScale(Vector2D factors)
Create a transform representing a scale operation.static AffineTransformMatrix2D
AffineTransformMatrix2D. createTranslation(Vector2D translation)
Create a transform representing the given translation.Vector2D.Unit
Vector2D. directionTo(Vector2D v)
Return the unit vector representing the direction of displacement from this vector to the given vector.protected Vector2D
RegionBSPTree2D.BoundaryProjector2D. disambiguateClosestPoint(Vector2D target, Vector2D a, Vector2D b)
Method used to determine which of pointsa
andb
should be considered as the "closest" point totarget
when the points are exactly equidistant.double
Line. distance(Vector2D p)
Compute the distance between the instance and a point.double
Vector2D. distance(Vector2D v)
Compute the distance between the instance and another vector.double
Vector2D. distanceSq(Vector2D v)
Compute the square of the distance between the instance and another vector.double
Vector2D. dot(Vector2D v)
Compute the dot-product of the instance and another vector.boolean
Vector2D. eq(Vector2D vec, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Return true if the current instance and given vector are considered equal as evaluated by the given precision context.static Bounds2D
Bounds2D. from(Vector2D first, Vector2D... more)
Construct a new instance from the given points.static Vector2D.Unit
Vector2D.Unit. from(Vector2D v)
Create a normalized vector.static PolarCoordinates
PolarCoordinates. fromCartesian(Vector2D vec)
Convert the given Cartesian coordinates to polar form.static AffineTransformMatrix2D
AffineTransformMatrix2D. fromColumnVectors(Vector2D u, Vector2D v)
Get a new transform create from the given column vectors.static AffineTransformMatrix2D
AffineTransformMatrix2D. fromColumnVectors(Vector2D u, Vector2D v, Vector2D t)
Get a new transform created from the given column vectors.static Line
Lines. fromPointAndAngle(Vector2D pt, double angle, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Create a line from a point lying on the line and an angle relative to the abscissa (x) axis.static Line
Lines. fromPointAndDirection(Vector2D pt, Vector2D dir, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Create a line from a point and direction.static Line
Lines. fromPoints(Vector2D p1, Vector2D p2, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Create a line from two points lying on the line.private <T extends Vector2D>
TVector2D. getComponent(Vector2D base, boolean reject, DoubleFunction2N<T> factory)
Returns a component of the current instance relative to the given base vector.private void
RegionBSPTree2D.PartitionedRegionBuilder2D. insertAxisAlignedGridRecursive(Vector2D min, Vector2D max, int level, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Recursively insert axis-aligned grid partitions.RegionBSPTree2D.PartitionedRegionBuilder2D
RegionBSPTree2D.PartitionedRegionBuilder2D. insertAxisAlignedPartitions(Vector2D center, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Insert two axis aligned lines intersecting at the given point as partitions.Vector2D
Vector2D. lerp(Vector2D p, double t)
Get a vector constructed by linearly interpolating between this vector and the given vector.static Vector2D
Vector2D. max(Vector2D first, Vector2D... more)
Return a vector containing the maximum component values from all input vectors.static Vector2D
Vector2D. min(Vector2D first, Vector2D... more)
Return a vector containing the minimum component values from all input vectors.static Vector2D.Sum
Vector2D.Sum. of(Vector2D initial)
Construct a new instance with an initial value set to the argument.static Vector2D.Sum
Vector2D.Sum. of(Vector2D first, Vector2D... more)
Construct a new instance from multiple values.double
Line. offset(Vector2D point)
Get the offset (oriented distance) of a point with respect to this instance.Vector2D.Unit
Vector2D. orthogonal(Vector2D dir)
Get a unit vector orthogonal to the current vector and pointing in the direction ofdir
.Vector2D
Line. project(Vector2D point)
Project a point onto this instance.Vector2D
RegionBSPTree2D. project(Vector2D pt)
Project a point onto the boundary of the region.Vector2D
Vector2D. project(Vector2D base)
Get the projection of the instance onto the given base vector.Ray
Line. rayFrom(Vector2D startPoint)
Create a new ray instance that starts at the projection of the given point and continues in the direction of the line to infinity.static Ray
Lines. rayFromPoint(Line line, Vector2D startPoint)
Construct a ray starting at the given point and continuing to infinity in the direction ofline
.static Ray
Lines. rayFromPointAndDirection(Vector2D startPoint, Vector2D direction, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a ray from a start point and a direction.Vector2D
Vector2D. reject(Vector2D base)
Get the rejection of the instance from the given base vector.static ReverseRay
Lines. reverseRayFromPoint(Line line, Vector2D endPoint)
Construct a reverse ray starting at infinity and continuing in the direction ofline
to the given end point.static ReverseRay
Lines. reverseRayFromPointAndDirection(Vector2D endPoint, Vector2D lineDirection, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a reverse ray from an end point and a line direction.ReverseRay
Line. reverseRayTo(Vector2D endPoint)
Create a new convex line subset that starts at infinity and continues along the line up to the projection of the given end point.AffineTransformMatrix2D
AffineTransformMatrix2D. rotate(Vector2D center, double angle)
Apply a counterclockwise rotation about the given center point to the current instance, returning the result as a new transform.AffineTransformMatrix2D
AffineTransformMatrix2D. rotate(Vector2D center, Rotation2D rotation)
Apply a counterclockwise rotation about the given center point to the current instance, returning the result as a new transform.AffineTransformMatrix2D
AffineTransformMatrix2D. scale(Vector2D scaleFactors)
Apply a scale operation to the current instance, returning the result as a new transform.Segment
Line. segment(Vector2D a, Vector2D b)
Create a new line segment from two points.static Segment
Lines. segmentFromPoints(Line line, Vector2D a, Vector2D b)
Construct a new line segment from a line and a pair of points.static Segment
Lines. segmentFromPoints(Vector2D startPoint, Vector2D endPoint, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a new line segment from two points.double
Vector2D. signedArea(Vector2D v)
Compute the signed area of the parallelogram with sides formed by this instance and the given vector.(package private) abstract Split<LineConvexSubset>
LineConvexSubset. splitOnIntersection(Line splitter, Vector2D intersection)
Split this instance using the given splitter line and intersection point.(package private) Split<LineConvexSubset>
LineSpanningSubset. splitOnIntersection(Line splitter, Vector2D intersection)
Split this instance using the given splitter line and intersection point.(package private) Split<LineConvexSubset>
Ray. splitOnIntersection(Line splitter, Vector2D intersection)
Split this instance using the given splitter line and intersection point.protected Split<LineConvexSubset>
ReverseRay. splitOnIntersection(Line splitter, Vector2D intersection)
Split this instance using the given splitter line and intersection point.(package private) Split<LineConvexSubset>
Segment. splitOnIntersection(Line splitter, Vector2D intersection)
Split this instance using the given splitter line and intersection point.Vector2D
Vector2D. subtract(double factor, Vector2D v)
Subtract a scaled vector from the instance.Vector2D
Vector2D. subtract(Vector2D v)
Subtract a vector from the instance.Vector1D
Line. toSubspace(Vector2D point)
Transform a space point into a subspace point.Vector1D
LineSubset. toSubspace(Vector2D pt)
Transform a space point into a subspace point.AffineTransformMatrix2D
AffineTransformMatrix2D. translate(Vector2D translation)
Apply a translation to the current instance, returning the result as a new transform.Vector2D
Vector2D. vectorTo(Vector2D v)
Return the vector representing the displacement from this vector to the given vector.Method parameters in org.apache.commons.geometry.euclidean.twod with type arguments of type Vector2D Modifier and Type Method Description Bounds2D.Builder
Bounds2D.Builder. addAll(java.lang.Iterable<? extends Vector2D> pts)
Add a collection of points to this instance.static Vector2D
Vector2D. centroid(java.lang.Iterable<Vector2D> pts)
Compute the centroid of the given points.private static Vector2D
Vector2D. computeCentroid(Vector2D first, java.util.Iterator<? extends Vector2D> more)
Internal method for computing the centroid of a set of points.private static Vector2D
Vector2D. computeMax(Vector2D first, java.util.Iterator<? extends Vector2D> more)
Internal method for computing a max vector.private static Vector2D
Vector2D. computeMin(Vector2D first, java.util.Iterator<? extends Vector2D> more)
Internal method for computing a min vector.static ConvexArea
ConvexArea. convexPolygonFromVertices(java.util.Collection<Vector2D> vertices, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a convex polygon from the given vertices.static AffineTransformMatrix2D
AffineTransformMatrix2D. from(java.util.function.UnaryOperator<Vector2D> fn)
Construct a new transform representing the given function.static Bounds2D
Bounds2D. from(java.lang.Iterable<Vector2D> points)
Construct a new instance from the given points.static Vector2D
Vector2D. max(java.lang.Iterable<Vector2D> vecs)
Return a vector containing the maximum component values from all input vectors.static Vector2D
Vector2D. min(java.lang.Iterable<Vector2D> vecs)
Return a vector containing the minimum component values from all input vectors.boolean
Line. similarOrientation(Hyperplane<Vector2D> other)
Return true if this instance has a similar orientation to the given hyperplane, meaning that they point in generally the same direction.Split<ConvexArea>
ConvexArea. split(Hyperplane<Vector2D> splitter)
Split this instance with the given hyperplane.Split<EmbeddedTreeLineSubset>
EmbeddedTreeLineSubset. split(Hyperplane<Vector2D> splitter)
Split this instance with the given hyperplane.Split<LineConvexSubset>
LineConvexSubset. split(Hyperplane<Vector2D> splitter)
Split this instance with the given hyperplane.Split<RegionBSPTree2D>
RegionBSPTree2D. split(Hyperplane<Vector2D> splitter)
Split this instance with the given hyperplane.Line.SubspaceTransform
Line. subspaceTransform(Transform<Vector2D> transform)
Get an object containing the current line transformed by the argument along with a 1D transform that can be applied to subspace points.ConvexArea
ConvexArea. transform(Transform<Vector2D> transform)
Return a new instance transformed by the argument.EmbeddedTreeLineSubset
EmbeddedTreeLineSubset. transform(Transform<Vector2D> transform)
Return a new hyperplane subset resulting from the application of the given transform.Line
Line. transform(Transform<Vector2D> transform)
Transform this instance using the givenTransform
.abstract LineConvexSubset
LineConvexSubset. transform(Transform<Vector2D> transform)
Return a new hyperplane subset resulting from the application of the given transform.LineSpanningSubset
LineSpanningSubset. transform(Transform<Vector2D> transform)
Return a new hyperplane subset resulting from the application of the given transform.Ray
Ray. transform(Transform<Vector2D> transform)
Return a new hyperplane subset resulting from the application of the given transform.ReverseRay
ReverseRay. transform(Transform<Vector2D> transform)
Return a new hyperplane subset resulting from the application of the given transform.Segment
Segment. transform(Transform<Vector2D> transform)
Return a new hyperplane subset resulting from the application of the given transform.Vector2D
Vector2D. transform(java.util.function.UnaryOperator<Vector2D> fn)
Convenience method to apply a function to this vector.LineConvexSubset
ConvexArea. trim(HyperplaneConvexSubset<Vector2D> convexSubset)
Trim the given hyperplane subset to the portion contained inside this instance.Constructors in org.apache.commons.geometry.euclidean.twod with parameters of type Vector2D Constructor Description BoundaryProjector2D(Vector2D point)
Simple constructor.Bounds2D(Vector2D min, Vector2D max)
Simple constructor.LinecastPoint2D(Vector2D point, Vector2D normal, Line line)
Construct a new instance from its components.Ray(Line line, Vector2D startPoint)
Construct a ray from a line and a start point.ReverseRay(Line line, Vector2D endPoint)
Construct a new instance from the given line and end point.Segment(Line line, Vector2D startPoint, Vector2D endPoint)
Construct a new instance from a line and two points on the line.Sum(Vector2D initial)
Construct a new instance with the given initial value.Constructor parameters in org.apache.commons.geometry.euclidean.twod with type arguments of type Vector2D Constructor Description RegionNode2D(AbstractBSPTree<Vector2D,RegionBSPTree2D.RegionNode2D> tree)
Simple constructor. -
Uses of Vector2D in org.apache.commons.geometry.euclidean.twod.path
Fields in org.apache.commons.geometry.euclidean.twod.path declared as Vector2D Modifier and Type Field Description private Vector2D
LinePath.Builder. endVertex
The current vertex at the end of the path.private Vector2D
AbstractLinePathConnector.ConnectableLineSubset. start
Line subset start point.private Vector2D
LinePath.Builder. startVertex
The current vertex at the start of the path.Methods in org.apache.commons.geometry.euclidean.twod.path that return Vector2D Modifier and Type Method Description private Vector2D
LinePath. getEndVertex()
Get the end vertex for the path or null if the path is empty or has an infinite end line subset.private Vector2D
LinePath. getStartVertex()
Get the start vertex for the path or null if the path is empty or has an infinite start line subset.Methods in org.apache.commons.geometry.euclidean.twod.path that return types with arguments of type Vector2D Modifier and Type Method Description java.util.List<Vector2D>
LinePath. getVertexSequence()
Get the sequence of vertices defined by the path.Methods in org.apache.commons.geometry.euclidean.twod.path with parameters of type Vector2D Modifier and Type Method Description LinePath.Builder
LinePath.Builder. append(Vector2D vertex)
Add a vertex to the end of this path.LinePath.Builder
LinePath.Builder. appendVertices(Vector2D... vertices)
Convenience method for appending multiple vertices to the path at once.LinePath.Builder
LinePath.Builder. prepend(Vector2D vertex)
Add a vertex to the front of this path.LinePath.Builder
LinePath.Builder. prependVertices(Vector2D... vertices)
Convenience method for prepending multiple vertices to the path in a single method call.Method parameters in org.apache.commons.geometry.euclidean.twod.path with type arguments of type Vector2D Modifier and Type Method Description LinePath.Builder
LinePath.Builder. appendVertices(java.util.Collection<? extends Vector2D> vertices)
Convenience method for appending a collection of vertices to the path in a single method call.static LinePath
LinePath. fromVertexLoop(java.util.Collection<Vector2D> vertices, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Build a new path from the given vertices.static LinePath
LinePath. fromVertices(java.util.Collection<Vector2D> vertices, boolean close, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Build a new path from the given vertices.static LinePath
LinePath. fromVertices(java.util.Collection<Vector2D> vertices, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Build a new path from the given vertices.LinePath.Builder
LinePath.Builder. prependVertices(java.util.Collection<Vector2D> vertices)
Convenience method for prepending a collection of vertices to the path in a single method call.LinePath
LinePath. transform(Transform<Vector2D> transform)
Transform this instance with the argument, returning the result in a new instance.Constructors in org.apache.commons.geometry.euclidean.twod.path with parameters of type Vector2D Constructor Description ConnectableLineSubset(Vector2D start)
Create a new instance with the given start point.ConnectableLineSubset(Vector2D start, LineConvexSubset subset)
Create a new instance with the given start point and line subset. -
Uses of Vector2D in org.apache.commons.geometry.euclidean.twod.rotation
Methods in org.apache.commons.geometry.euclidean.twod.rotation that return Vector2D Modifier and Type Method Description Vector2D
Rotation2D. apply(Vector2D pt)
Vector2D
Rotation2D. applyVector(Vector2D vec)
Apply this transform to the given vector, ignoring translations.Methods in org.apache.commons.geometry.euclidean.twod.rotation with parameters of type Vector2D Modifier and Type Method Description Vector2D
Rotation2D. apply(Vector2D pt)
Vector2D
Rotation2D. applyVector(Vector2D vec)
Apply this transform to the given vector, ignoring translations.static Rotation2D
Rotation2D. createVectorRotation(Vector2D u, Vector2D v)
Create a rotation instance that rotates the vectoru
to point in the direction of vectorv
. -
Uses of Vector2D in org.apache.commons.geometry.euclidean.twod.shape
Fields in org.apache.commons.geometry.euclidean.twod.shape declared as Vector2D Modifier and Type Field Description private Vector2D
Parallelogram.Builder. position
Amount to translate the parallelogram.private Vector2D
Parallelogram.Builder. scale
Amount to scale the parallelogram.Fields in org.apache.commons.geometry.euclidean.twod.shape with type parameters of type Vector2D Modifier and Type Field Description private static java.util.List<Vector2D>
Parallelogram. UNIT_SQUARE_VERTICES
Vertices defining a square with sides of length 1 centered on the origin.Methods in org.apache.commons.geometry.euclidean.twod.shape that return Vector2D Modifier and Type Method Description Vector2D
Circle. firstIntersection(Line line)
Get the first intersection point between the given line and this circle, or null if no such point exists.private Vector2D
Circle.CircleApproximationBuilder. pointAt(int idx)
Get the boundary vertex point at the given index.Vector2D
Circle. project(Vector2D pt)
Project a point onto the boundary of the region.Methods in org.apache.commons.geometry.euclidean.twod.shape that return types with arguments of type Vector2D Modifier and Type Method Description java.util.List<Vector2D>
Circle. intersections(Line line)
Get the intersections of the given line with this circle.Methods in org.apache.commons.geometry.euclidean.twod.shape with parameters of type Vector2D Modifier and Type Method Description static Parallelogram
Parallelogram. axisAligned(Vector2D a, Vector2D b, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Return a new instance representing an axis-aligned rectangle.static Circle
Circle. from(Vector2D center, double radius, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a circle from a center point and radius.Vector2D
Circle. project(Vector2D pt)
Project a point onto the boundary of the region.Parallelogram.Builder
Parallelogram.Builder. setPosition(Vector2D pos)
Set the center position of the created parallelogram.Parallelogram.Builder
Parallelogram.Builder. setScale(Vector2D scaleFactors)
Set the scaling for the created parallelogram.Parallelogram.Builder
Parallelogram.Builder. setXDirection(Vector2D xDirection)
Set the rotation of the created parallelogram such that the relative x-axis of the shape points in the given direction.Parallelogram.Builder
Parallelogram.Builder. setYDirection(Vector2D yDirection)
Set the rotation of the created parallelogram such that the relative y-axis of the shape points in the given direction.Method parameters in org.apache.commons.geometry.euclidean.twod.shape with type arguments of type Vector2D Modifier and Type Method Description static Parallelogram
Parallelogram. fromTransformedUnitSquare(Transform<Vector2D> transform, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Create a new instance by transforming a unit square centered at the origin.Constructors in org.apache.commons.geometry.euclidean.twod.shape with parameters of type Vector2D Constructor Description Circle(Vector2D center, double radius, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a new circle from its component parts. -
Uses of Vector2D in org.apache.commons.geometry.spherical.oned
Methods in org.apache.commons.geometry.spherical.oned that return Vector2D Modifier and Type Method Description Vector2D
Point1S. getVector()
Get the normalized vector corresponding to this azimuth angle in 2D Euclidean space.Methods in org.apache.commons.geometry.spherical.oned with parameters of type Vector2D Modifier and Type Method Description static Point1S
Point1S. from(Vector2D vector)
Create a new point instance from the given Euclidean 2D vector.
-