Uses of Class
org.apache.commons.geometry.euclidean.threed.Vector3D
-
Packages that use Vector3D Package Description org.apache.commons.geometry.euclidean.internal This package contains Euclidean geometry utilities and classes intended for internal use only.org.apache.commons.geometry.euclidean.threed This package provides basic 3D geometry components.org.apache.commons.geometry.euclidean.threed.line This package provides classes and utilities for lines in 3D Euclidean space.org.apache.commons.geometry.euclidean.threed.mesh This package contains types representing 3D mesh data structures.org.apache.commons.geometry.euclidean.threed.rotation This package provides components related to rotations in 3 dimensional Euclidean space.org.apache.commons.geometry.euclidean.threed.shape This package provides utilities for constructing basic 3D shapes.org.apache.commons.geometry.io.euclidean.threed This package contains the core interfaces and classes providing IO functionality for Euclidean 3D space.org.apache.commons.geometry.io.euclidean.threed.obj This package contains types for reading and writing the OBJ geometric data file format.org.apache.commons.geometry.io.euclidean.threed.stl This package contains types for reading and writing the STL geometric data file format.org.apache.commons.geometry.io.euclidean.threed.txt This package contains types for working with simple text-based 3D geometric data formats, including CSV and simple text files.org.apache.commons.geometry.spherical.twod This package provides basic geometry components on the 2-sphere. -
-
Uses of Vector3D in org.apache.commons.geometry.euclidean.internal
Method parameters in org.apache.commons.geometry.euclidean.internal with type arguments of type Vector3D Modifier and Type Method Description static <T> java.util.List<T>
EuclideanUtils. convexPolygonToTriangleFan(java.util.List<Vector3D> vertices, java.util.function.Function<java.util.List<Vector3D>,T> fn)
Convert a convex polygon defined by a list of vertices into a triangle fan.static <T> java.util.List<T>
EuclideanUtils. convexPolygonToTriangleFan(java.util.List<Vector3D> vertices, java.util.function.Function<java.util.List<Vector3D>,T> fn)
Convert a convex polygon defined by a list of vertices into a triangle fan.private static int
EuclideanUtils. findBestTriangleFanIndex(java.util.List<Vector3D> vertices)
Find the index of the best vertex to use as the base for a triangle fan split of the convex polygon defined by the given vertices. -
Uses of Vector3D in org.apache.commons.geometry.euclidean.threed
Subclasses of Vector3D in org.apache.commons.geometry.euclidean.threed Modifier and Type Class Description static class
Vector3D.Unit
Represents unit vectors.Fields in org.apache.commons.geometry.euclidean.threed declared as Vector3D Modifier and Type Field Description private Vector3D
Planes.PlaneRegionExtruder. extrusionVector
Vector to extrude along; the extruded plane is translated from the base plane by this amount.static Vector3D
Vector3D. NaN
A vector with all coordinates set to NaN.static Vector3D
Vector3D. NEGATIVE_INFINITY
A vector with all coordinates set to negative infinity.private Vector3D
SimpleTriangle3D. p1
First point in the triangle.private Vector3D
SimpleTriangle3D. p2
Second point in the triangle.private Vector3D
SimpleTriangle3D. p3
Third point in the triangle.static Vector3D
Vector3D. POSITIVE_INFINITY
A vector with all coordinates set to positive infinity.private Vector3D
Planes.PlaneBuilder. prevPt
The previous point from the point sequence.private Vector3D
Planes.PlaneBuilder. prevVector
The previous vector from the point sequence, preceding from thestartPt
toprevPt
.private Vector3D
Planes.PlaneBuilder. startPt
The start point from the point sequence.static Vector3D
Vector3D. ZERO
Zero (null) vector (coordinates: 0, 0, 0).Fields in org.apache.commons.geometry.euclidean.threed with type parameters of type Vector3D Modifier and Type Field Description static java.util.Comparator<Vector3D>
Vector3D. COORDINATE_ASCENDING_ORDER
Comparator that sorts vectors in component-wise ascending order.private java.util.Collection<? extends Vector3D>
Planes.PlaneBuilder. pts
The point sequence to build a plane for.private java.util.List<? super Vector3D>
Planes.PlaneBuilder. uniqueVertexOutput
List that unique vertices discovered in the input sequence will be added to.private java.util.List<Vector3D>
VertexListConvexPolygon3D. vertices
Vertex loop defining the convex polygon.Methods in org.apache.commons.geometry.euclidean.threed with type parameters of type Vector3D Modifier and Type Method Description private <V extends Vector3D>
VVector3D. getComponent(Vector3D base, boolean reject, DoubleFunction3N<V> factory)
Returns a component of the current instance relative to the given base vector.Methods in org.apache.commons.geometry.euclidean.threed that return Vector3D Modifier and Type Method Description Vector3D
Vector3D. add(double factor, Vector3D v)
Add a scaled vector to the instance.Vector3D
Vector3D. add(Vector3D v)
Add a vector to the instance.Vector3D
AffineTransformMatrix3D. apply(Vector3D pt)
Apply this transform to the given point, returning the result as a new instance.Vector3D
AffineTransformMatrix3D. applyVector(Vector3D vec)
Apply this transform to the given vector, ignoring translations.static Vector3D
Vector3D. centroid(java.lang.Iterable<Vector3D> pts)
Compute the centroid of the given points.static Vector3D
Vector3D. centroid(Vector3D first, Vector3D... more)
Compute the centroid of the given points.Vector3D
AbstractConvexPolygon3D. closest(Vector3D 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.Vector3D
AbstractEmbeddedRegionPlaneSubset. closest(Vector3D 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 Vector3D
Vector3D. computeCentroid(Vector3D first, java.util.Iterator<? extends Vector3D> more)
Internal method for computing the centroid of a set of points.private static Vector3D
Vector3D. computeMax(Vector3D first, java.util.Iterator<? extends Vector3D> more)
Internal method for computing a max vector.private static Vector3D
Vector3D. computeMin(Vector3D first, java.util.Iterator<? extends Vector3D> more)
Internal method for computing a min vector.Vector3D
Vector3D. cross(Vector3D v)
Compute the cross-product of the instance with another vector.protected Vector3D
RegionBSPTree3D.BoundaryProjector3D. disambiguateClosestPoint(Vector3D target, Vector3D a, Vector3D b)
Method used to determine which of pointsa
andb
should be considered as the "closest" point totarget
when the points are exactly equidistant.Vector3D
Vector3D.Sum. get()
Vector3D
AbstractConvexPolygon3D. getCentroid()
Get the centroid, or geometric center, of the hyperplane subset or null if no centroid exists or one exists but is not unique.Vector3D
AbstractEmbeddedRegionPlaneSubset. getCentroid()
Get the centroid, or geometric center, of the hyperplane subset or null if no centroid exists or one exists but is not unique.Vector3D
ConvexVolume. getCentroid()
Get the centroid, or geometric center, of the region or null if no centroid exists or one exists but is not unique.Vector3D
SimpleTriangle3D. getCentroid()
Get the centroid, or geometric center, of the hyperplane subset or null if no centroid exists or one exists but is not unique.Vector3D
Plane. getOrigin()
Get the orthogonal projection of the 3D-space origin in the plane.Vector3D
SimpleTriangle3D. getPoint1()
The first point in the triangle.Vector3D
Triangle3D. getPoint1()
The first point in the triangle.Vector3D
SimpleTriangle3D. getPoint2()
The second point in the triangle.Vector3D
Triangle3D. getPoint2()
The second point in the triangle.Vector3D
SimpleTriangle3D. getPoint3()
The third point in the triangle.Vector3D
Triangle3D. getPoint3()
The third point in the triangle.Vector3D
Vector3D. getZero()
Get the zero (null) vector of the space.Vector3D
AbstractPlaneSubset. intersection(Line3D line)
Get the unique intersection of this plane subset with the given line.Vector3D
AbstractPlaneSubset. intersection(LineConvexSubset3D lineSubset)
Get the unique intersection of this plane subset with the given line subset.Vector3D
Plane. intersection(Line3D line)
Get the intersection of a line with this plane.static Vector3D
Plane. intersection(Plane plane1, Plane plane2, Plane plane3)
Get the intersection point of three planes.(package private) static Vector3D
Planes. intersection(PlaneSubset planeSubset, Line3D line)
Get the unique intersection of the plane subset with the given line.(package private) static Vector3D
Planes. intersection(PlaneSubset planeSubset, LineConvexSubset3D lineSubset)
Get the unique intersection of the plane subset with the given line subset.Vector3D
PlaneSubset. intersection(Line3D line)
Get the unique intersection of this plane subset with the given line.Vector3D
PlaneSubset. intersection(LineConvexSubset3D lineSubset)
Get the unique intersection of this plane subset with the given line subset.Vector3D
Vector3D. lerp(Vector3D p, double t)
Get a vector constructed by linearly interpolating between this vector and the given vector.static Vector3D
Vector3D. max(java.lang.Iterable<Vector3D> vecs)
Return a vector containing the maximum component values from all input vectors.static Vector3D
Vector3D. max(Vector3D first, Vector3D... more)
Return a vector containing the maximum component values from all input vectors.static Vector3D
Vector3D. min(java.lang.Iterable<Vector3D> vecs)
Return a vector containing the minimum component values from all input vectors.static Vector3D
Vector3D. min(Vector3D first, Vector3D... more)
Return a vector containing the minimum component values from all input vectors.Vector3D
Vector3D. multiply(double a)
Multiply the instance by a scalar.Vector3D
Vector3D. negate()
Get the negation of the instance.static Vector3D
Vector3D. of(double[] v)
Creates a vector from the coordinates in the given 3-element array.static Vector3D
Vector3D. of(double x, double y, double z)
Returns a vector with the given coordinate values.static Vector3D
Vector3D. parse(java.lang.String str)
Parses the given string and returns a new vector instance.Vector3D
EmbeddingPlane. pointAt(Vector2D inPlane, double offset)
Get one point from the 3D-space.Vector3D
Plane. project(Vector3D point)
Project a point onto this instance.Vector3D
RegionBSPTree3D. project(Vector3D pt)
Project a point onto the boundary of the region.Vector3D
Vector3D. project(Vector3D base)
Get the projection of the instance onto the given base vector.Vector3D
Vector3D. reject(Vector3D base)
Get the rejection of the instance from the given base vector.Vector3D
Vector3D. subtract(double factor, Vector3D v)
Subtract a scaled vector from the instance.Vector3D
Vector3D. subtract(Vector3D v)
Subtract a vector from the instance.static Vector3D
SphericalCoordinates. toCartesian(double radius, double azimuth, double polar)
Convert the given set of spherical coordinates to Cartesian coordinates.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.Vector3D
SphericalCoordinates. toVector()
Convert this set of spherical coordinates to a Cartesian form.Vector3D
Vector3D. transform(java.util.function.UnaryOperator<Vector3D> fn)
Convenience method to apply a function to this vector.Vector3D
Vector3D. vectorTo(Vector3D v)
Return the vector representing the displacement from this vector to the given vector.Vector3D
Vector3D.Unit. withNorm(double mag)
Returns a vector with the same direction but with the given norm.Vector3D
Vector3D. withNorm(double magnitude)
Returns a vector with the same direction but with the given norm.Methods in org.apache.commons.geometry.euclidean.threed that return types with arguments of type Vector3D Modifier and Type Method Description private java.util.List<Vector3D>
AbstractConvexPolygon3D. buildPolygonSplitVertexList(int enterIdx, Vector3D newEnterPt, int exitIdx, Vector3D newExitPt, java.util.List<? extends Vector3D> vertices)
Internal method for building a vertex list for one side of a split result.protected AbstractRegionBSPTree.RegionSizeProperties<Vector3D>
RegionBSPTree3D. computeRegionSizeProperties()
Compute the size-related properties of the region.AbstractRegionBSPTree.RegionSizeProperties<Vector3D>
RegionBSPTree3D.RegionSizePropertiesVisitor. getRegionSizeProperties()
Return the computed size properties for the visited region.java.util.List<Vector3D>
EmbeddedAreaPlaneConvexSubset. getVertices()
Get the vertices for the convex subset in a counter-clockwise order as viewed looking down the plane normal.java.util.List<Vector3D>
PlaneConvexSubset. getVertices()
Get the vertices for the convex subset in a counter-clockwise order as viewed looking down the plane normal.java.util.List<Vector3D>
SimpleTriangle3D. getVertices()
Get the vertices for the convex subset in a counter-clockwise order as viewed looking down the plane normal.java.util.List<Vector3D>
VertexListConvexPolygon3D. getVertices()
Get the vertices for the convex subset in a counter-clockwise order as viewed looking down the plane normal.Methods in org.apache.commons.geometry.euclidean.threed with parameters of type Vector3D Modifier and Type Method Description Bounds3D.Builder
Bounds3D.Builder. add(Vector3D pt)
Add a point to this instance.Vector3D
Vector3D. add(double factor, Vector3D v)
Add a scaled vector to the instance.Vector3D
Vector3D. add(Vector3D v)
Add a vector to the instance.Vector3D.Sum
Vector3D.Sum. add(Vector3D vec)
Add a vector to this instance.Vector3D.Sum
Vector3D.Sum. addScaled(double scale, Vector3D vec)
Add a scaled vector to this instance.double
Vector3D. angle(Vector3D v)
Compute the angular separation between two vectors in radians.Vector3D
AffineTransformMatrix3D. apply(Vector3D pt)
Apply this transform to the given point, returning the result as a new instance.Vector3D.Unit
AffineTransformMatrix3D. applyDirection(Vector3D vec)
Apply this transform to the given vector, ignoring translations and normalizing the result.Vector3D
AffineTransformMatrix3D. applyVector(Vector3D vec)
Apply this transform to the given vector, ignoring translations.private <T> T
AffineTransformMatrix3D. applyVector(Vector3D vec, DoubleFunction3N<T> factory)
Multiplies the given vector by the 3x3 linear transformation matrix contained in the upper-right corner of the affine transformation matrix.private java.util.List<Vector3D>
AbstractConvexPolygon3D. buildPolygonSplitVertexList(int enterIdx, Vector3D newEnterPt, int exitIdx, Vector3D newExitPt, java.util.List<? extends Vector3D> vertices)
Internal method for building a vertex list for one side of a split result.static Vector3D
Vector3D. centroid(Vector3D first, Vector3D... more)
Compute the centroid of the given points.RegionLocation
AbstractConvexPolygon3D. classify(Vector3D pt)
Classify a point with respect to the subset region.RegionLocation
AbstractEmbeddedRegionPlaneSubset. classify(Vector3D pt)
Classify a point with respect to the subset region.Vector3D
AbstractConvexPolygon3D. closest(Vector3D 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.Vector3D
AbstractEmbeddedRegionPlaneSubset. closest(Vector3D 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 Vector3D
Vector3D. computeCentroid(Vector3D first, java.util.Iterator<? extends Vector3D> more)
Internal method for computing the centroid of a set of points.private LinecastPoint3D
RegionBSPTree3D.LinecastVisitor. computeLinecastPoint(Vector3D pt, RegionBSPTree3D.RegionNode3D 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 Vector3D
Vector3D. computeMax(Vector3D first, java.util.Iterator<? extends Vector3D> more)
Internal method for computing a max vector.private static Vector3D
Vector3D. computeMin(Vector3D first, java.util.Iterator<? extends Vector3D> more)
Internal method for computing a min vector.boolean
Bounds3D. contains(Vector3D pt)
Return true if the given point is strictly within or on the boundary of the bounding box.boolean
Bounds3D. contains(Vector3D 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
Plane. contains(Vector3D p)
Check if the instance contains a point.static AffineTransformMatrix3D
AffineTransformMatrix3D. createRotation(Vector3D center, QuaternionRotation rotation)
Create a transform representing a rotation about the given center point.static AffineTransformMatrix3D
AffineTransformMatrix3D. createScale(Vector3D factors)
Create a transform representing a scale operation.static AffineTransformMatrix3D
AffineTransformMatrix3D. createTranslation(Vector3D translation)
Create a transform representing the given translation.Vector3D
Vector3D. cross(Vector3D v)
Compute the cross-product of the instance with another vector.Vector3D.Unit
Vector3D. directionTo(Vector3D v)
Return the unit vector representing the direction of displacement from this vector to the given vector.protected Vector3D
RegionBSPTree3D.BoundaryProjector3D. disambiguateClosestPoint(Vector3D target, Vector3D a, Vector3D b)
Method used to determine which of pointsa
andb
should be considered as the "closest" point totarget
when the points are exactly equidistant.double
Vector3D. distance(Vector3D v)
Compute the distance between the instance and another vector.double
Vector3D. distanceSq(Vector3D v)
Compute the square of the distance between the instance and another vector.double
Vector3D. dot(Vector3D v)
Compute the dot-product of the instance and another vector.boolean
Vector3D. eq(Vector3D 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 java.util.List<PlaneConvexSubset>
Planes. extrude(LinePath path, EmbeddingPlane plane, Vector3D extrusionVector, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Get the boundaries of the 3D region created by extruding a 2D line path.static java.util.List<PlaneConvexSubset>
Planes. extrude(RegionBSPTree2D region, EmbeddingPlane plane, Vector3D extrusionVector, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Get the boundaries of the 3D region created by extruding a 2D region.private ConvexPolygon3D
Planes.PlaneRegionExtruder. extrudeSideFinite(Vector3D startPt, Vector3D endPt)
Extrude a single, finite boundary forming one of the sides of the extruded region.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.static Bounds3D
Bounds3D. from(Vector3D first, Vector3D... more)
Construct a new instance from the given points.static Vector3D.Unit
Vector3D.Unit. from(Vector3D v)
Create a normalized vector.static SphericalCoordinates
SphericalCoordinates. fromCartesian(Vector3D vec)
Convert the given set of Cartesian coordinates to spherical coordinates.static AffineTransformMatrix3D
AffineTransformMatrix3D. fromColumnVectors(Vector3D u, Vector3D v, Vector3D w)
Get a new transform create from the given column vectors.static AffineTransformMatrix3D
AffineTransformMatrix3D. fromColumnVectors(Vector3D u, Vector3D v, Vector3D w, Vector3D t)
Get a new transform created from the given column vectors.static Plane
Planes. fromNormal(Vector3D normal, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Build a plane from a normal.static Plane
Planes. fromPointAndNormal(Vector3D p, Vector3D normal, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Build a plane from a point and a normal.static EmbeddingPlane
Planes. fromPointAndPlaneVectors(Vector3D p, Vector3D u, Vector3D v, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Build a plane from a point and two (on plane) vectors.static Plane
Planes. fromPoints(Vector3D p1, Vector3D p2, Vector3D p3, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Build a plane from three points.private <V extends Vector3D>
VVector3D. getComponent(Vector3D base, boolean reject, DoubleFunction3N<V> factory)
Returns a component of the current instance relative to the given base vector.static java.util.List<ConvexPolygon3D>
Planes. indexedConvexPolygons(Vector3D[] vertices, int[][] faceIndices, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a list ofConvexPolygon3D
instances from a set of vertices and arrays of face indices.static java.util.List<Triangle3D>
Planes. indexedTriangles(Vector3D[] vertices, int[][] faceIndices, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a list ofTriangle3D
instances from a set of vertices and arrays of face indices.private void
RegionBSPTree3D.PartitionedRegionBuilder3D. insertAxisAlignedGridRecursive(Vector3D min, Vector3D max, int level, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Recursively insert axis-aligned grid partitions.RegionBSPTree3D.PartitionedRegionBuilder3D
RegionBSPTree3D.PartitionedRegionBuilder3D. insertAxisAlignedPartitions(Vector3D center, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Insert a set of three axis aligned planes intersecting at the given point as partitions.Vector3D
Vector3D. lerp(Vector3D p, double t)
Get a vector constructed by linearly interpolating between this vector and the given vector.static Vector3D
Vector3D. max(Vector3D first, Vector3D... more)
Return a vector containing the maximum component values from all input vectors.static Vector3D
Vector3D. min(Vector3D first, Vector3D... more)
Return a vector containing the minimum component values from all input vectors.static Vector3D.Sum
Vector3D.Sum. of(Vector3D initial)
Construct a new instance with an initial value set to the argument.static Vector3D.Sum
Vector3D.Sum. of(Vector3D first, Vector3D... more)
Construct a new instance from multiple values.double
Plane. offset(Vector3D point)
Get the offset (oriented distance) of a point with respect to this instance.Vector3D.Unit
Vector3D. orthogonal(Vector3D dir)
Get a unit vector orthogonal to the current vector and pointing in the direction ofdir
.private void
Planes.PlaneBuilder. processCrossProduct(Vector3D cross)
Process the computed cross product of two vectors from the input point sequence.private void
Planes.PlaneBuilder. processPoint(Vector3D pt)
Process a point from the point sequence.Vector3D
Plane. project(Vector3D point)
Project a point onto this instance.Vector3D
RegionBSPTree3D. project(Vector3D pt)
Project a point onto the boundary of the region.Vector3D
Vector3D. project(Vector3D base)
Get the projection of the instance onto the given base vector.Vector3D
Vector3D. reject(Vector3D base)
Get the rejection of the instance from the given base vector.AffineTransformMatrix3D
AffineTransformMatrix3D. rotate(Vector3D center, QuaternionRotation rotation)
Apply a rotation around the given center point to the current instance, returning the result as a new transform.EmbeddingPlane
EmbeddingPlane. rotate(Vector3D center, QuaternionRotation rotation)
Rotate the plane around the specified point.Plane
Plane. rotate(Vector3D center, QuaternionRotation rotation)
Rotate the plane around the specified point.AffineTransformMatrix3D
AffineTransformMatrix3D. scale(Vector3D scaleFactors)
Apply a scale operation to the current instance, returning the result as a new transform.Vector3D
Vector3D. subtract(double factor, Vector3D v)
Subtract a scaled vector from the instance.Vector3D
Vector3D. subtract(Vector3D v)
Subtract a vector from the instance.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.AffineTransformMatrix3D
AffineTransformMatrix3D. translate(Vector3D translation)
Apply a translation to the current instance, returning the result as a new transform.EmbeddingPlane
EmbeddingPlane. translate(Vector3D translation)
Translate the plane by the specified amount.Plane
Plane. translate(Vector3D translation)
Translate the plane by the specified amount.static Triangle3D
Planes. triangleFromVertices(Vector3D p1, Vector3D p2, Vector3D p3, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a triangle from three vertices.Vector3D
Vector3D. vectorTo(Vector3D v)
Return the vector representing the displacement from this vector to the given vector.Method parameters in org.apache.commons.geometry.euclidean.threed with type arguments of type Vector3D Modifier and Type Method Description Bounds3D.Builder
Bounds3D.Builder. addAll(java.lang.Iterable<? extends Vector3D> pts)
Add a collection of points to this instance.private void
RegionBSPTree3D.RegionSizePropertiesVisitor. addBoundaryContribution(HyperplaneSubset<Vector3D> boundary, boolean reverse)
Add the contribution of the given node cut boundary.(package private) Plane
Planes.PlaneBuilder. buildForConvexPolygon(java.util.List<? super Vector3D> vertexOutput)
Build a plane from the configured point sequence, validating that the points form a convex region and adding all discovered unique points to the given list.private java.util.List<Vector3D>
AbstractConvexPolygon3D. buildPolygonSplitVertexList(int enterIdx, Vector3D newEnterPt, int exitIdx, Vector3D newExitPt, java.util.List<? extends Vector3D> vertices)
Internal method for building a vertex list for one side of a split result.static Vector3D
Vector3D. centroid(java.lang.Iterable<Vector3D> pts)
Compute the centroid of the given points.private static Vector3D
Vector3D. computeCentroid(Vector3D first, java.util.Iterator<? extends Vector3D> more)
Internal method for computing the centroid of a set of points.private static Vector3D
Vector3D. computeMax(Vector3D first, java.util.Iterator<? extends Vector3D> more)
Internal method for computing a max vector.private static Vector3D
Vector3D. computeMin(Vector3D first, java.util.Iterator<? extends Vector3D> more)
Internal method for computing a min vector.static ConvexPolygon3D
Planes. convexPolygonFromVertices(java.util.Collection<Vector3D> pts, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Create a new convex polygon from the given sequence of vertices.(package private) static java.util.List<Triangle3D>
Planes. convexPolygonToTriangleFan(Plane plane, java.util.List<Vector3D> vertices)
Convert a convex polygon defined by a plane and list of points into a triangle fan.static AffineTransformMatrix3D
AffineTransformMatrix3D. from(java.util.function.UnaryOperator<Vector3D> fn)
Construct a new transform representing the given function.static Bounds3D
Bounds3D. from(java.lang.Iterable<Vector3D> points)
Construct a new instance from the given points.(package private) static ConvexPolygon3D
Planes. fromConvexPlanarVertices(Plane plane, java.util.List<Vector3D> vertices)
Construct a convex polygon 3D from a plane and a list of vertices lying in the plane.static Plane
Planes. fromPoints(java.util.Collection<Vector3D> pts, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a plane from a collection of points lying on the plane.static java.util.List<ConvexPolygon3D>
Planes. indexedConvexPolygons(java.util.List<? extends Vector3D> vertices, int[][] faceIndices, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a list ofConvexPolygon3D
instances from a set of vertices and arrays of face indices.static java.util.List<Triangle3D>
Planes. indexedTriangles(java.util.List<? extends Vector3D> vertices, int[][] faceIndices, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a list ofTriangle3D
instances from a set of vertices and arrays of face indices.static Vector3D
Vector3D. max(java.lang.Iterable<Vector3D> vecs)
Return a vector containing the maximum component values from all input vectors.static Vector3D
Vector3D. min(java.lang.Iterable<Vector3D> vecs)
Return a vector containing the minimum component values from all input vectors.boolean
Plane. similarOrientation(Hyperplane<Vector3D> other)
Return true if this instance has a similar orientation to the given hyperplane, meaning that they point in generally the same direction.Split<PlaneConvexSubset>
AbstractConvexPolygon3D. split(Hyperplane<Vector3D> splitter)
Split this instance with the given hyperplane.Split<ConvexVolume>
ConvexVolume. split(Hyperplane<Vector3D> splitter)
Split this instance with the given hyperplane.Split<PlaneConvexSubset>
EmbeddedAreaPlaneConvexSubset. split(Hyperplane<Vector3D> splitter)
Split this instance with the given hyperplane.Split<EmbeddedTreePlaneSubset>
EmbeddedTreePlaneSubset. split(Hyperplane<Vector3D> splitter)
Split this instance with the given hyperplane.Split<PlaneConvexSubset>
PlaneConvexSubset. split(Hyperplane<Vector3D> splitter)
Split this instance with the given hyperplane.Split<RegionBSPTree3D>
RegionBSPTree3D. split(Hyperplane<Vector3D> splitter)
Split this instance with the given hyperplane.EmbeddingPlane.SubspaceTransform
EmbeddingPlane. subspaceTransform(Transform<Vector3D> transform)
Get an object containing the current plane transformed by the argument along with a 2D transform that can be applied to subspace points.ConvexPolygon3D
ConvexPolygon3D. transform(Transform<Vector3D> transform)
Return a new hyperplane subset resulting from the application of the given transform.ConvexVolume
ConvexVolume. transform(Transform<Vector3D> transform)
Return a new instance transformed by the argument.EmbeddedAreaPlaneConvexSubset
EmbeddedAreaPlaneConvexSubset. transform(Transform<Vector3D> transform)
Return a new hyperplane subset resulting from the application of the given transform.EmbeddedTreePlaneSubset
EmbeddedTreePlaneSubset. transform(Transform<Vector3D> transform)
Return a new hyperplane subset resulting from the application of the given transform.EmbeddingPlane
EmbeddingPlane. transform(Transform<Vector3D> transform)
Transform this instance using the givenTransform
.Plane
Plane. transform(Transform<Vector3D> transform)
Transform this instance using the givenTransform
.PlaneConvexSubset
PlaneConvexSubset. transform(Transform<Vector3D> transform)
Return a new hyperplane subset resulting from the application of the given transform.SimpleTriangle3D
SimpleTriangle3D. transform(Transform<Vector3D> transform)
Return a new hyperplane subset resulting from the application of the given transform.Triangle3D
Triangle3D. transform(Transform<Vector3D> transform)
Return a new hyperplane subset resulting from the application of the given transform.Vector3D
Vector3D. transform(java.util.function.UnaryOperator<Vector3D> fn)
Convenience method to apply a function to this vector.VertexListConvexPolygon3D
VertexListConvexPolygon3D. transform(Transform<Vector3D> transform)
Return a new hyperplane subset resulting from the application of the given transform.PlaneConvexSubset
ConvexVolume. trim(HyperplaneConvexSubset<Vector3D> convexSubset)
Trim the given hyperplane subset to the portion contained inside this instance.Constructors in org.apache.commons.geometry.euclidean.threed with parameters of type Vector3D Constructor Description BoundaryProjector3D(Vector3D point)
Simple constructor.Bounds3D(Vector3D min, Vector3D max)
Simple constructor.PlaneRegionExtruder(EmbeddingPlane basePlane, Vector3D extrusionVector, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a new instance that performs extrusions frombasePlane
alongextrusionVector
.SimpleTriangle3D(Plane plane, Vector3D p1, Vector3D p2, Vector3D p3)
Construct a new instance from a plane and 3 points.Sum(Vector3D initial)
Construct a new instance with the given initial value.Constructor parameters in org.apache.commons.geometry.euclidean.threed with type arguments of type Vector3D Constructor Description PlaneBuilder(java.util.Collection<? extends Vector3D> pts, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a new build instance for the given point sequence and precision context.RegionNode3D(AbstractBSPTree<Vector3D,RegionBSPTree3D.RegionNode3D> tree)
Simple constructor.VertexListConvexPolygon3D(Plane plane, java.util.List<Vector3D> vertices)
Construct a new instance with the given plane and list of vertices. -
Uses of Vector3D in org.apache.commons.geometry.euclidean.threed.line
Fields in org.apache.commons.geometry.euclidean.threed.line declared as Vector3D Modifier and Type Field Description private Vector3D
Line3D. direction
Line direction.private Vector3D
Line3D. origin
Line point closest to the origin.Methods in org.apache.commons.geometry.euclidean.threed.line that return Vector3D Modifier and Type Method Description Vector3D
Line3D. closest(Line3D line)
Compute the point of the instance closest to another line.Vector3D
EmbeddedTreeLineSubset3D. getCentroid()
Get the centroid, or geometric center, of the line subset or null if the subset is empty or infinite.Vector3D
LineSpanningSubset3D. getCentroid()
Get the centroid, or geometric center, of the line subset or null if the subset is empty or infinite.abstract Vector3D
LineSubset3D. getCentroid()
Get the centroid, or geometric center, of the line subset or null if the subset is empty or infinite.Vector3D
Ray3D. getCentroid()
Get the centroid, or geometric center, of the line subset or null if the subset is empty or infinite.Vector3D
ReverseRay3D. getCentroid()
Get the centroid, or geometric center, of the line subset or null if the subset is empty or infinite.Vector3D
Segment3D. getCentroid()
Get the centroid, or geometric center, of the line subset or null if the subset is empty or infinite.Vector3D
Line3D. getDirection()
Get the normalized direction vector.Vector3D
Ray3D. getDirection()
Get the direction of the ray.abstract Vector3D
LineConvexSubset3D. getEndPoint()
Get the end point for the line subset.Vector3D
LineSpanningSubset3D. getEndPoint()
Get the end point for the line subset.Vector3D
Ray3D. getEndPoint()
Get the end point for the line subset.Vector3D
ReverseRay3D. getEndPoint()
Get the end point for the line subset.Vector3D
Segment3D. getEndPoint()
Get the end point for the line subset.Vector3D
Line3D. getOrigin()
Get the line point closest to the origin.abstract Vector3D
LineConvexSubset3D. getStartPoint()
Get the start point for the line subset.Vector3D
LineSpanningSubset3D. getStartPoint()
Get the start point for the line subset.Vector3D
Ray3D. getStartPoint()
Vector3D
ReverseRay3D. getStartPoint()
Get the start point for the line subset.Vector3D
Segment3D. getStartPoint()
Get the start point for the line subset.Vector3D
Line3D. intersection(Line3D line)
Get the intersection point of the instance and another line.Vector3D
Line3D. pointAt(double abscissa)
Get one point from the line.Vector3D
Line3D. toSpace(double abscissa)
Get the 3 dimensional point at the given abscissa position on the line.Vector3D
Line3D. toSpace(Vector1D pt)
Transform a subspace point into a space point.Vector3D
LineSubset3D. toSpace(Vector1D pt)
Transform a subspace point into a space point.Methods in org.apache.commons.geometry.euclidean.threed.line with parameters of type Vector3D Modifier and Type Method Description double
Line3D. abscissa(Vector3D pt)
Get the abscissa of the given point on the line.boolean
Line3D. contains(Vector3D pt)
Check if the instance contains a point.boolean
LineConvexSubset3D. contains(Vector3D pt)
Return true if the given point lies in the line subset.double
Line3D. distance(Vector3D pt)
Compute the distance between the instance and a point.static Line3D
Lines3D. fromPointAndDirection(Vector3D pt, Vector3D dir, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Create a new line instance from a point and a direction.static Line3D
Lines3D. fromPoints(Vector3D p1, Vector3D p2, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Create a new line instance from two points that lie on the line.Ray3D
Line3D. rayFrom(Vector3D 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 Ray3D
Lines3D. rayFromPoint(Line3D line, Vector3D startPoint)
Construct a ray starting at the given point and continuing to infinity in the direction ofline
.static Ray3D
Lines3D. rayFromPointAndDirection(Vector3D startPoint, Vector3D direction, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a ray from a start point and a direction.static ReverseRay3D
Lines3D. reverseRayFromPoint(Line3D line, Vector3D endPoint)
Construct a reverse ray starting at infinity and continuing in the direction ofline
to the given end point.static ReverseRay3D
Lines3D. reverseRayFromPointAndDirection(Vector3D endPoint, Vector3D lineDirection, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a reverse ray from an end point and a line direction.ReverseRay3D
Line3D. reverseRayTo(Vector3D endPoint)
Create a new line convex subset that starts at infinity and continues along the line up to the projection of the given end point.Segment3D
Line3D. segment(Vector3D a, Vector3D b)
Create a new line segment from two points.static Segment3D
Lines3D. segmentFromPoints(Line3D line, Vector3D a, Vector3D b)
Construct a new line segment from a line and a pair of points.static Segment3D
Lines3D. segmentFromPoints(Vector3D startPoint, Vector3D endPoint, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a new line segment from two points.Vector1D
Line3D. toSubspace(Vector3D pt)
Transform a space point into a subspace point.Vector1D
LineSubset3D. toSubspace(Vector3D pt)
Transform a space point into a subspace point.Method parameters in org.apache.commons.geometry.euclidean.threed.line with type arguments of type Vector3D Modifier and Type Method Description Line3D.SubspaceTransform
Line3D. subspaceTransform(Transform<Vector3D> transform)
Get an object containing the current line transformed by the argument along with a 1D transform that can be applied to subspace points.EmbeddedTreeLineSubset3D
EmbeddedTreeLineSubset3D. transform(Transform<Vector3D> transform)
Transform this instance.Line3D
Line3D. transform(Transform<Vector3D> transform)
Transform this instance.abstract LineConvexSubset3D
LineConvexSubset3D. transform(Transform<Vector3D> transform)
Transform this instance.LineSpanningSubset3D
LineSpanningSubset3D. transform(Transform<Vector3D> transform)
Transform this instance.Ray3D
Ray3D. transform(Transform<Vector3D> transform)
Transform this instance.ReverseRay3D
ReverseRay3D. transform(Transform<Vector3D> transform)
Transform this instance.Segment3D
Segment3D. transform(Transform<Vector3D> transform)
Transform this instance.Constructors in org.apache.commons.geometry.euclidean.threed.line with parameters of type Vector3D Constructor Description Line3D(Vector3D origin, Vector3D direction, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Simple constructor.LinecastPoint3D(Vector3D point, Vector3D normal, Line3D line)
Construct a new instance from its components.Ray3D(Line3D line, Vector3D startPoint)
Construct a ray from a line and a start point.ReverseRay3D(Line3D line, Vector3D endPoint)
Construct a new instance from the given line and end point.Segment3D(Line3D line, Vector3D startPoint, Vector3D endPoint)
Construct a new instance from a line and two points on the line. -
Uses of Vector3D in org.apache.commons.geometry.euclidean.threed.mesh
Fields in org.apache.commons.geometry.euclidean.threed.mesh with type parameters of type Vector3D Modifier and Type Field Description private java.util.Map<Vector3D,java.lang.Integer>
SimpleTriangleMesh.Builder. vertexIndexMap
Map of vertices to their first occurrence in the vertex list.private java.util.ArrayList<Vector3D>
SimpleTriangleMesh.Builder. vertices
List of vertices.private java.util.List<Vector3D>
SimpleTriangleMesh. vertices
Vertices in the mesh.Methods in org.apache.commons.geometry.euclidean.threed.mesh that return Vector3D Modifier and Type Method Description Vector3D
SimpleTriangleMesh.SimpleTriangleFace. getPoint1()
Get the first vertex in the face.Vector3D
TriangleMesh.Face. getPoint1()
Get the first vertex in the face.Vector3D
SimpleTriangleMesh.SimpleTriangleFace. getPoint2()
Get the second vertex in the face.Vector3D
TriangleMesh.Face. getPoint2()
Get the second vertex in the face.Vector3D
SimpleTriangleMesh.SimpleTriangleFace. getPoint3()
Get the third vertex in the face.Vector3D
TriangleMesh.Face. getPoint3()
Get the third vertex in the face.Vector3D
SimpleTriangleMesh.Builder. getVertex(int index)
Get the vertex at the given index.Methods in org.apache.commons.geometry.euclidean.threed.mesh that return types with arguments of type Vector3D Modifier and Type Method Description private java.util.Map<Vector3D,java.lang.Integer>
SimpleTriangleMesh.Builder. getVertexIndexMap()
Get the vertex index map, creating and initializing it if needed.java.util.List<Vector3D>
Mesh.Face. getVertices()
Get the vertices for the face.java.util.List<Vector3D>
Mesh. getVertices()
Get a list containing all vertices in the mesh.java.util.List<Vector3D>
SimpleTriangleMesh. getVertices()
Get a list containing all vertices in the mesh.java.util.List<Vector3D>
SimpleTriangleMesh.SimpleTriangleFace. getVertices()
Get the vertices for the face.java.lang.Iterable<Vector3D>
Mesh. vertices()
Get an iterable containing the vertices in the mesh.java.lang.Iterable<Vector3D>
SimpleTriangleMesh. vertices()
Get an iterable containing the vertices in the mesh.Methods in org.apache.commons.geometry.euclidean.threed.mesh with parameters of type Vector3D Modifier and Type Method Description SimpleTriangleMesh.Builder
SimpleTriangleMesh.Builder. addFaceAndVertices(Vector3D p1, Vector3D p2, Vector3D p3)
Add a face and its vertices to this mesh.SimpleTriangleMesh.Builder
SimpleTriangleMesh.Builder. addFaceUsingVertices(Vector3D p1, Vector3D p2, Vector3D p3)
Add a face to this mesh, only adding vertices to the vertex list if equivalent vertices are not found.private int
SimpleTriangleMesh.Builder. addToVertexIndexMap(Vector3D vertex, int targetIdx, java.util.Map<? super Vector3D,java.lang.Integer> map)
Add a vertex to the given vertex index map.private int
SimpleTriangleMesh.Builder. addToVertexList(Vector3D vertex)
Append the given vertex to the end of the vertex list.int
SimpleTriangleMesh.Builder. addVertex(Vector3D vertex)
Add a vertex directly to the vertex list, returning the index of the added vertex.SimpleTriangleMesh.Builder
SimpleTriangleMesh.Builder. addVertices(Vector3D[] newVertices)
Add a group of vertices directly to the vertex list.int
SimpleTriangleMesh.FuzzyVectorComparator. compare(Vector3D a, Vector3D b)
static SimpleTriangleMesh
SimpleTriangleMesh. from(Vector3D[] vertices, int[][] faces, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a new triangle mesh from the given vertices and face indices.int
SimpleTriangleMesh.Builder. useVertex(Vector3D vertex)
Use a vertex in the constructed mesh.Method parameters in org.apache.commons.geometry.euclidean.threed.mesh with type arguments of type Vector3D Modifier and Type Method Description private int
SimpleTriangleMesh.Builder. addToVertexIndexMap(Vector3D vertex, int targetIdx, java.util.Map<? super Vector3D,java.lang.Integer> map)
Add a vertex to the given vertex index map.SimpleTriangleMesh.Builder
SimpleTriangleMesh.Builder. addVertices(java.util.Collection<? extends Vector3D> newVertices)
Add a group of vertices directly to the vertex list.static SimpleTriangleMesh
SimpleTriangleMesh. from(java.util.Collection<Vector3D> vertices, java.util.Collection<int[]> faces, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a new triangle mesh from the given vertices and face indices.Mesh<F>
Mesh. transform(Transform<Vector3D> transform)
Return a new, transformed mesh by applying the given transform to all vertices.SimpleTriangleMesh
SimpleTriangleMesh. transform(Transform<Vector3D> transform)
Return a new, transformed mesh by applying the given transform to all vertices.TriangleMesh
TriangleMesh. transform(Transform<Vector3D> transform)
Return a new, transformed mesh by applying the given transform to all vertices.Constructor parameters in org.apache.commons.geometry.euclidean.threed.mesh with type arguments of type Vector3D Constructor Description SimpleTriangleMesh(java.util.List<Vector3D> vertices, java.util.List<int[]> faces, Bounds3D bounds, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a new instance from a vertex list and set of faces. -
Uses of Vector3D in org.apache.commons.geometry.euclidean.threed.rotation
Fields in org.apache.commons.geometry.euclidean.threed.rotation declared as Vector3D Modifier and Type Field Description private Vector3D
AxisSequence. axis1
Axis of the first rotation.private Vector3D
AxisSequence. axis2
Axis of the second rotation.private Vector3D
AxisSequence. axis3
Axis of the third rotation.Methods in org.apache.commons.geometry.euclidean.threed.rotation that return Vector3D Modifier and Type Method Description Vector3D
QuaternionRotation. apply(Vector3D v)
Apply this rotation to the given vector.Vector3D
Rotation3D. apply(Vector3D vec)
Apply this rotation to the given argument.Vector3D
QuaternionRotation. applyVector(Vector3D vec)
Apply this transform to the given vector, ignoring translations.Vector3D
QuaternionRotation. getAxis()
Get the axis of rotation as a normalizedVector3D
.Vector3D
Rotation3D. getAxis()
Get the axis of rotation as a normalizedVector3D
.Vector3D
AxisSequence. getAxis1()
Get the first rotation axis.Vector3D
AxisSequence. getAxis2()
Get the second rotation axis.Vector3D
AxisSequence. getAxis3()
Get the third rotation axis.Vector3D[]
AxisSequence. toArray()
Get an array containing the 3 rotation axes in order.Methods in org.apache.commons.geometry.euclidean.threed.rotation with parameters of type Vector3D Modifier and Type Method Description Vector3D
QuaternionRotation. apply(Vector3D v)
Apply this rotation to the given vector.Vector3D
Rotation3D. apply(Vector3D vec)
Apply this rotation to the given argument.Vector3D
QuaternionRotation. applyVector(Vector3D vec)
Apply this transform to the given vector, ignoring translations.static QuaternionRotation
QuaternionRotation. createBasisRotation(Vector3D u1, Vector3D u2, Vector3D v1, Vector3D v2)
Return an instance that rotates the basis defined by the first two vectors into the basis defined by the second two.static QuaternionRotation
QuaternionRotation. createVectorRotation(Vector3D u, Vector3D v)
Return an instance that rotates the first vector to the second.static QuaternionRotation
QuaternionRotation. fromAxisAngle(Vector3D axis, double angle)
Create a new instance representing a rotation ofangle
radians aroundaxis
.private double[]
QuaternionRotation. getAbsoluteEulerAngles(Vector3D axis1, Vector3D axis2)
Get a sequence of angles around the given Euler axes that produce a rotation equivalent to this instance.private double[]
QuaternionRotation. getAbsoluteTaitBryanAngles(Vector3D axis1, Vector3D axis2, Vector3D axis3)
Get a sequence of angles around the given Tait-Bryan axes that produce a rotation equivalent to this instance.private double[]
QuaternionRotation. getRelativeEulerAngles(Vector3D axis1, Vector3D axis2)
Get a sequence of angles around the given Euler axes that produce a rotation equivalent to this instance.private double[]
QuaternionRotation. getRelativeTaitBryanAngles(Vector3D axis1, Vector3D axis2, Vector3D axis3)
Get a sequence of angles around the given Tait-Bryan axes that produce a rotation equivalent to this instance.Constructors in org.apache.commons.geometry.euclidean.threed.rotation with parameters of type Vector3D Constructor Description AxisSequence(AxisSequenceType type, Vector3D axis1, Vector3D axis2, Vector3D axis3)
Simple constructor. -
Uses of Vector3D in org.apache.commons.geometry.euclidean.threed.shape
Fields in org.apache.commons.geometry.euclidean.threed.shape declared as Vector3D Modifier and Type Field Description private Vector3D
Parallelepiped.Builder. position
Amount to translate the parallelepiped.private Vector3D
Parallelepiped.Builder. scale
Amount to scale the parallelepiped.Fields in org.apache.commons.geometry.euclidean.threed.shape with type parameters of type Vector3D Modifier and Type Field Description private static java.util.List<Vector3D>
Parallelepiped. UNIT_CUBE_VERTICES
Vertices defining a cube with sides of length 1 centered at the origin.Methods in org.apache.commons.geometry.euclidean.threed.shape that return Vector3D Modifier and Type Method Description Vector3D
Sphere. firstIntersection(Line3D line)
Get the first intersection point between the given line and this sphere, or null if no such point exists.Vector3D
Sphere. project(Vector3D pt)
Project a point onto the boundary of the region.Methods in org.apache.commons.geometry.euclidean.threed.shape that return types with arguments of type Vector3D Modifier and Type Method Description java.util.List<Vector3D>
Sphere. intersections(Line3D line)
Get the intersections of the given line with this sphere.Methods in org.apache.commons.geometry.euclidean.threed.shape with parameters of type Vector3D Modifier and Type Method Description private void
Sphere.SphereMeshApproximationBuilder. addSubdivided(Vector3D p1, Vector3D p2, Vector3D p3, int level)
Recursively subdivide and add triangular faces between the given outer boundary points.static Parallelepiped
Parallelepiped. axisAligned(Vector3D a, Vector3D b, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Return a new instance representing an axis-aligned parallelepiped, ie, a rectangular prism.private Plane
Sphere.SphereTreeApproximationBuilder. createPlane(Vector3D p1, Vector3D p2, Vector3D p3)
Create a plane from the given points, using the precision context of the sphere.private static void
Parallelepiped. ensureNonZeroSideLength(Vector3D a, Vector3D b, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Ensure that the given points defining one side of a parallelepiped face are separated by a non-zero distance, as determined by the precision context.static Sphere
Sphere. from(Vector3D center, double radius, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a sphere from a center point and radius.private RegionBSPTree3D.RegionNode3D
Sphere.SphereTreeApproximationBuilder. insertSubdividedTriangles(RegionBSPTree3D.RegionNode3D node, Vector3D p1, Vector3D p2, Vector3D p3, int level)
Recursively insert subdivided triangles into the given node.private void
Sphere.SphereTreeApproximationBuilder. partitionAndInsert(RegionBSPTree3D.RegionNode3D node, Vector3D p1, Vector3D p2, Vector3D p3, int level)
Recursively insert structural BSP tree cuts into the given node and then insert subdivided triangles when a target subdivision level is reached.Vector3D
Sphere. project(Vector3D pt)
Project a point onto the boundary of the region.Parallelepiped.Builder
Parallelepiped.Builder. setPosition(Vector3D pos)
Set the center position of the created parallelepiped.Parallelepiped.Builder
Parallelepiped.Builder. setScale(Vector3D scaleFactors)
Set the scaling for the created parallelepiped.Method parameters in org.apache.commons.geometry.euclidean.threed.shape with type arguments of type Vector3D Modifier and Type Method Description private static PlaneConvexSubset
Parallelepiped. createFace(int a, int b, int c, int d, java.util.List<? extends Vector3D> vertices, boolean reverse, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Create a single face of a parallelepiped using the indices of elements in the given vertex list.static Parallelepiped
Parallelepiped. fromTransformedUnitCube(Transform<Vector3D> transform, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a new instance by transforming a unit cube centered at the origin.Constructors in org.apache.commons.geometry.euclidean.threed.shape with parameters of type Vector3D Constructor Description Sphere(Vector3D center, double radius, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct a new sphere from its component parts. -
Uses of Vector3D in org.apache.commons.geometry.io.euclidean.threed
Fields in org.apache.commons.geometry.io.euclidean.threed declared as Vector3D Modifier and Type Field Description private Vector3D
SimpleFacetDefinition. normal
Facet normal; may be null.Fields in org.apache.commons.geometry.io.euclidean.threed with type parameters of type Vector3D Modifier and Type Field Description private java.util.List<Vector3D>
SimpleFacetDefinition. vertices
Facet vertices.Methods in org.apache.commons.geometry.io.euclidean.threed that return Vector3D Modifier and Type Method Description Vector3D
FacetDefinition. getNormal()
Get the normal defined for the facet or null if one has not been explicitly specified.Vector3D
SimpleFacetDefinition. getNormal()
Get the normal defined for the facet or null if one has not been explicitly specified.Methods in org.apache.commons.geometry.io.euclidean.threed that return types with arguments of type Vector3D Modifier and Type Method Description java.util.List<Vector3D>
FacetDefinition. getVertices()
Get the facet vertices.java.util.List<Vector3D>
SimpleFacetDefinition. getVertices()
Get the facet vertices.Methods in org.apache.commons.geometry.io.euclidean.threed with parameters of type Vector3D Modifier and Type Method Description static ConvexPolygon3D
FacetDefinitions. toPolygon(java.util.Collection<Vector3D> vertices, Vector3D normal, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct aConvexPolygon3D
from the given facet vertices and optional normal.Method parameters in org.apache.commons.geometry.io.euclidean.threed with type arguments of type Vector3D Modifier and Type Method Description static ConvexPolygon3D
FacetDefinitions. toPolygon(java.util.Collection<Vector3D> vertices, Vector3D normal, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Construct aConvexPolygon3D
from the given facet vertices and optional normal.Constructors in org.apache.commons.geometry.io.euclidean.threed with parameters of type Vector3D Constructor Description SimpleFacetDefinition(java.util.List<Vector3D> vertices, Vector3D normal)
Construct a new instance with the given vertices and normal.Constructor parameters in org.apache.commons.geometry.io.euclidean.threed with type arguments of type Vector3D Constructor Description SimpleFacetDefinition(java.util.List<Vector3D> vertices)
Construct a new instance with the given vertices and no defined normal.SimpleFacetDefinition(java.util.List<Vector3D> vertices, Vector3D normal)
Construct a new instance with the given vertices and normal. -
Uses of Vector3D in org.apache.commons.geometry.io.euclidean.threed.obj
Fields in org.apache.commons.geometry.io.euclidean.threed.obj with type parameters of type Vector3D Modifier and Type Field Description private java.util.List<Vector3D>
ObjFacetDefinitionReader. normals
List of normals encountered in the input.private java.util.List<Vector3D>
ObjTriangleMeshReader. normals
List of normals discovered in the input.private java.util.List<Vector3D>
ObjFacetDefinitionReader. vertices
List of vertices encountered in the input.Methods in org.apache.commons.geometry.io.euclidean.threed.obj that return Vector3D Modifier and Type Method Description Vector3D
PolygonObjParser.Face. computeNormalFromVertices(java.util.function.IntFunction<Vector3D> modelVertexFn)
Compute a normal for the face using its first three vertices.Vector3D
PolygonObjParser.Face. getDefinedCompositeNormal(java.util.function.IntFunction<Vector3D> modelNormalFn)
Get a composite normal for the face by computing the sum of all defined vertex normals and normalizing the result.Vector3D
AbstractObjParser. readVector()
Read a whitespace-delimited 3D vector from the current data line.Methods in org.apache.commons.geometry.io.euclidean.threed.obj that return types with arguments of type Vector3D Modifier and Type Method Description java.util.List<Vector3D>
PolygonObjParser.Face. getVertices(java.util.function.IntFunction<Vector3D> modelVertexFn)
Get the face vertices in the order defined in the face definition.java.util.List<Vector3D>
PolygonObjParser.Face. getVerticesCounterClockwise(Vector3D normal, java.util.function.IntFunction<Vector3D> modelVertexFn)
Get the face vertices in the order that produces a counter-clockwise winding when viewed looking down the given normal.Methods in org.apache.commons.geometry.io.euclidean.threed.obj with parameters of type Vector3D Modifier and Type Method Description private void
ObjWriter.MeshBuffer. addFace(java.util.List<Vector3D> vertices, Vector3D normal)
Add a face to the buffer.int
ObjWriter.MeshBuffer. addNormal(Vector3D normal)
Add a normal to the buffer.private int
ObjWriter.MeshBuffer. addToMap(Vector3D vec, java.util.Map<java.lang.String,java.lang.Integer> map)
Convert the given vector to on OBJ definition string and add it to the map if not yet present.int
ObjWriter.MeshBuffer. addVertex(Vector3D vertex)
Add a vertex to the buffer.private java.lang.String
ObjWriter. createVectorString(Vector3D vec)
Create the OBJ string representation of the given vector.java.util.List<PolygonObjParser.VertexAttributes>
PolygonObjParser.Face. getVertexAttributesCounterClockwise(Vector3D normal, java.util.function.IntFunction<Vector3D> modelVertexFn)
Get the vertex attributes for the face listed in the order that produces a counter-clockwise winding of vertices when viewed looking down the given normal direction.java.util.List<Vector3D>
PolygonObjParser.Face. getVerticesCounterClockwise(Vector3D normal, java.util.function.IntFunction<Vector3D> modelVertexFn)
Get the face vertices in the order that produces a counter-clockwise winding when viewed looking down the given normal.protected abstract void
AbstractObjPolygonReader. handleNormal(Vector3D normal)
Method called when a normal is found in the OBJ content.protected void
ObjFacetDefinitionReader. handleNormal(Vector3D normal)
Method called when a normal is found in the OBJ content.protected void
ObjTriangleMeshReader. handleNormal(Vector3D normal)
Method called when a normal is found in the OBJ content.protected abstract void
AbstractObjPolygonReader. handleVertex(Vector3D vertex)
Method called when a vertex is found in the OBJ content.protected void
ObjFacetDefinitionReader. handleVertex(Vector3D vertex)
Method called when a vertex is found in the OBJ content.protected void
ObjTriangleMeshReader. handleVertex(Vector3D vertex)
Method called when a vertex is found in the OBJ content.int
ObjWriter. writeVertex(Vector3D vertex)
Write a vertex and return the 0-based index of the vertex in the output.int
ObjWriter. writeVertexNormal(Vector3D normal)
Write a vertex normal and return the 0-based index of the normal in the output.Method parameters in org.apache.commons.geometry.io.euclidean.threed.obj with type arguments of type Vector3D Modifier and Type Method Description private void
ObjWriter.MeshBuffer. addFace(java.util.List<Vector3D> vertices, Vector3D normal)
Add a face to the buffer.Vector3D
PolygonObjParser.Face. computeNormalFromVertices(java.util.function.IntFunction<Vector3D> modelVertexFn)
Compute a normal for the face using its first three vertices.Vector3D
PolygonObjParser.Face. getDefinedCompositeNormal(java.util.function.IntFunction<Vector3D> modelNormalFn)
Get a composite normal for the face by computing the sum of all defined vertex normals and normalizing the result.java.util.List<PolygonObjParser.VertexAttributes>
PolygonObjParser.Face. getVertexAttributesCounterClockwise(Vector3D normal, java.util.function.IntFunction<Vector3D> modelVertexFn)
Get the vertex attributes for the face listed in the order that produces a counter-clockwise winding of vertices when viewed looking down the given normal direction.java.util.List<Vector3D>
PolygonObjParser.Face. getVertices(java.util.function.IntFunction<Vector3D> modelVertexFn)
Get the face vertices in the order defined in the face definition.java.util.List<Vector3D>
PolygonObjParser.Face. getVerticesCounterClockwise(Vector3D normal, java.util.function.IntFunction<Vector3D> modelVertexFn)
Get the face vertices in the order that produces a counter-clockwise winding when viewed looking down the given normal. -
Uses of Vector3D in org.apache.commons.geometry.io.euclidean.threed.stl
Methods in org.apache.commons.geometry.io.euclidean.threed.stl that return Vector3D Modifier and Type Method Description private static Vector3D
StlUtils. computeTriangleNormal(Vector3D p1, Vector3D p2, Vector3D p3)
Get the normal using the right-hand rule for the given triangle vertices.(package private) static Vector3D
StlUtils. determineNormal(Vector3D p1, Vector3D p2, Vector3D p3, Vector3D normal)
Determine the normal that should be used for the given STL triangle vertices.private Vector3D
BinaryStlFacetDefinitionReader. readVector(java.nio.ByteBuffer buf)
Read a vector from the given byte buffer.private Vector3D
TextStlFacetDefinitionReader. readVector()
Read a vector from the input.Methods in org.apache.commons.geometry.io.euclidean.threed.stl with parameters of type Vector3D Modifier and Type Method Description private static Vector3D
StlUtils. computeTriangleNormal(Vector3D p1, Vector3D p2, Vector3D p3)
Get the normal using the right-hand rule for the given triangle vertices.(package private) static Vector3D
StlUtils. determineNormal(Vector3D p1, Vector3D p2, Vector3D p3, Vector3D normal)
Determine the normal that should be used for the given STL triangle vertices.(package private) static boolean
StlUtils. pointsAreCounterClockwise(Vector3D p1, Vector3D p2, Vector3D p3, Vector3D normal)
Return true if the given points are arranged counter-clockwise relative to the given normal.private void
BinaryStlWriter. putVector(Vector3D vec)
Put all double components ofvec
into the internal buffer.void
BinaryStlWriter. writeTriangle(Vector3D p1, Vector3D p2, Vector3D p3, Vector3D normal)
Write a triangle to the output using a default attribute value of 0.void
BinaryStlWriter. writeTriangle(Vector3D p1, Vector3D p2, Vector3D p3, Vector3D normal, int attributeValue)
Write a triangle to the output.void
TextStlWriter. writeTriangle(Vector3D p1, Vector3D p2, Vector3D p3, Vector3D normal)
Write a triangle to the output.void
TextStlWriter. writeTriangles(java.util.List<Vector3D> vertices, Vector3D normal)
Write the facet defined by the given vertices and normal to the output as triangles.private void
TextStlWriter. writeTriangleVertex(Vector3D vertex)
Write a triangle vertex to the output.private void
TextStlWriter. writeVector(Vector3D vec)
Write a vector to the output.Method parameters in org.apache.commons.geometry.io.euclidean.threed.stl with type arguments of type Vector3D Modifier and Type Method Description void
TextStlWriter. writeTriangles(java.util.List<Vector3D> vertices, Vector3D normal)
Write the facet defined by the given vertices and normal to the output as triangles.Constructors in org.apache.commons.geometry.io.euclidean.threed.stl with parameters of type Vector3D Constructor Description BinaryStlFacetDefinition(java.util.List<Vector3D> vertices, Vector3D normal, int attributeValue)
Construct a new instance.Constructor parameters in org.apache.commons.geometry.io.euclidean.threed.stl with type arguments of type Vector3D Constructor Description BinaryStlFacetDefinition(java.util.List<Vector3D> vertices, Vector3D normal, int attributeValue)
Construct a new instance. -
Uses of Vector3D in org.apache.commons.geometry.io.euclidean.threed.txt
Methods in org.apache.commons.geometry.io.euclidean.threed.txt that return Vector3D Modifier and Type Method Description private Vector3D
TextFacetDefinitionReader. readVector()
Read a vector starting from the current parser position.Methods in org.apache.commons.geometry.io.euclidean.threed.txt with parameters of type Vector3D Modifier and Type Method Description private void
TextFacetDefinitionWriter. write(Vector3D vertex)
Write a single vertex to the output.Method parameters in org.apache.commons.geometry.io.euclidean.threed.txt with type arguments of type Vector3D Modifier and Type Method Description void
TextFacetDefinitionWriter. write(java.util.List<Vector3D> vertices)
Write a list of vertices defining a facet as a single line of text to the output. -
Uses of Vector3D in org.apache.commons.geometry.spherical.twod
Methods in org.apache.commons.geometry.spherical.twod that return Vector3D Modifier and Type Method Description private static Vector3D
ConvexArea2S. computeArcPoleWeightedCentroidVector(java.util.List<GreatArc> arcs)
Compute the weighted centroid vector for the triangle or polygon formed by the given arcs by adding together the arc pole vectors multiplied by their respective arc lengths.private static Vector3D
ConvexArea2S. computeHemisphereWeightedCentroidVector(GreatArc arc)
Compute the weighted centroid vector for the hemisphere formed by the given arc.private static Vector3D
ConvexArea2S. computeLuneWeightedCentroidVector(GreatArc a, GreatArc b)
Compute the weighted centroid vector for the lune formed by the given arcs.private static Vector3D
ConvexArea2S. computeTriangleFanWeightedCentroidVector(java.util.List<GreatArc> arcs)
Compute the weighted centroid vector for the triangle or polygon formed by the given arcs using a triangle fan approach.(package private) Vector3D
ConvexArea2S. getWeightedCentroidVector()
Return the weighted centroid vector of the area.Vector3D
GreatCircle. vectorAt(double azimuth)
Get the vector on the great circle with the given azimuth angle.Methods in org.apache.commons.geometry.spherical.twod with parameters of type Vector3D Modifier and Type Method Description double
GreatCircle. azimuth(Vector3D vector)
Get the azimuth angle of a vector in the range[0, 2pi)
.static Transform2S
Transform2S. createReflection(Vector3D poleVector)
Create a transform that performs a reflection across the equatorial plane defined by the given pole point.static Transform2S
Transform2S. createRotation(Vector3D axis, double angle)
Create a transform that rotates the given angle aroundaxis
.static Point2S
Point2S. from(Vector3D vector)
Build a point from its underlying 3D vector.static GreatCircle
GreatCircles. fromPole(Vector3D pole, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Create a great circle instance from its pole vector.static GreatCircle
GreatCircles. fromPoleAndU(Vector3D pole, Vector3D u, org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
Create a great circle instance from its pole vector and a vector representing the u-axis in the equator plane.double
GreatCircle. offset(Vector3D vec)
Get the offset (oriented distance) of a direction.Transform2S
Transform2S. reflect(Vector3D poleVector)
Apply a reflection across the equatorial plane defined by the given pole vector to this instance.Transform2S
Transform2S. rotate(Vector3D axis, double angle)
Apply a rotation ofangle
radians around the given 3D axis to this instance.
-