Uses of Interface
org.joml.Vector2dc
Packages that use Vector2dc
-
Uses of Vector2dc in org.joml
Modifier and TypeMethodDescriptionVector2d.getToAddress(long address) Vector2dc.getToAddress(long address) Store this vector at the given off-heap memory address.Modifier and TypeMethodDescriptionAddvto this vector.Addvto this vector and store the result indest.doubledoubleReturn the angle between this vector and the supplied vector.doubledoubleReturn the distance between this andv.doubleVector2d.distanceSquared(Vector2dc v) doubleVector2dc.distanceSquared(Vector2dc v) Return the distance squared between this andv.Divide this byvcomponent-wise and store the result intodest.doubledoubleReturn the dot product of this vector andv.booleanbooleanCompare the vector components ofthisvector with the given vector using the givendeltaand return whether all of them are equal within a maximum difference ofdelta.static intIntersectiond.findClosestPointOnTriangle(Vector2dc v0, Vector2dc v1, Vector2dc v2, Vector2dc p, Vector2d result) Determine the closest point on the triangle with the verticesv0,v1,v2between that triangle and the given pointpand store that point into the givenresult.Add the component-wise multiplication ofa * bto this vector.Add the component-wise multiplication ofa * bto this vector.Add the component-wise multiplication ofa * bto this vector and store the result indest.Add the component-wise multiplication ofa * bto this vector and store the result indest.static booleanIntersectiond.intersectCircleCircle(Vector2dc centerA, double radiusSquaredA, Vector2dc centerB, double radiusSquaredB, Vector3d intersectionCenterAndHL) Test whether the one circle with centercenterAand square radiusradiusSquaredAintersects the other circle with centercenterBand square radiusradiusSquaredB, and store the center of the line segment of intersection in the(x, y)components of the supplied vector and the half-length of that line segment in the z component.static intIntersectiond.intersectLineSegmentAar(Vector2dc p0, Vector2dc p1, Vector2dc min, Vector2dc max, Vector2d result) Determine whether the undirected line segment with the end pointsp0andp1intersects the axis-aligned rectangle given as its minimum cornerminand maximum cornermax, and store the values of the parameter t in the ray equation p(t) = p0 + t * (p1 - p0) of the near and far point of intersection intoresult.static intIntersectiond.intersectPolygonRay(Vector2dc[] vertices, double originX, double originY, double dirX, double dirY, Vector2d p) Determine whether the polygon specified by the given sequence ofverticesintersects with the ray with given origin(originX, originY, originZ)and direction(dirX, dirY, dirZ), and store the point of intersection into the given vectorp.static intIntersectiond.intersectRayAar(Vector2dc origin, Vector2dc dir, Vector2dc min, Vector2dc max, Vector2d result) Determine whether the given ray with the givenoriginand directiondirintersects the axis-aligned rectangle given as its minimum cornerminand maximum cornermax, and return the values of the parameter t in the ray equation p(t) = origin + t * dir of the near and far point of intersection as well as the side of the axis-aligned rectangle the ray intersects.static booleanIntersectiond.intersectRayCircle(Vector2dc origin, Vector2dc dir, Vector2dc center, double radiusSquared, Vector2d result) Test whether the ray with the givenoriginand directiondirintersects the circle with the givencenterand square radiusradiusSquared, and store the values of the parameter t in the ray equation p(t) = origin + t * dir for both points (near and far) of intersections into the givenresultvector.static doubleIntersectiond.intersectRayLine(Vector2dc origin, Vector2dc dir, Vector2dc point, Vector2dc normal, double epsilon) Test whether the ray with givenoriginand directiondirintersects the line containing the givenpointand having the givennormal, and return the value of the parameter t in the ray equation p(t) = origin + t * dir of the intersection point.static doubleIntersectiond.intersectRayLineSegment(Vector2dc origin, Vector2dc dir, Vector2dc a, Vector2dc b) Determine whether the ray with givenoriginand directiondirintersects the undirected line segment given by the two end pointsaandb, and return the value of the parameter t in the ray equation p(t) = origin + t * dir of the intersection point, if any.Linearly interpolatethisandotherusing the given interpolation factortand store the result inthis.Linearly interpolatethisandotherusing the given interpolation factortand store the result indest.Set the components of this vector to be the component-wise maximum of this and the other vector.Set the components ofdestto be the component-wise maximum of this and the other vector.Set the components of this vector to be the component-wise minimum of this and the other vector.Set the components ofdestto be the component-wise minimum of this and the other vector.Multiply this Vector2d component-wise by another Vector2d.Multiply this Vector2d component-wise by another Vector2d and store the result indest.Apply a rotation transformation to this matrix that rotates the given normalizedfromDirdirection vector to point along the normalizedtoDir.Matrix3x2d.rotateTo(Vector2dc fromDir, Vector2dc toDir, Matrix3x2d dest) Apply a rotation transformation to this matrix that rotates the given normalizedfromDirdirection vector to point along the normalizedtoDir, and store the result indest.Matrix3x2dc.rotateTo(Vector2dc fromDir, Vector2dc toDir, Matrix3x2d dest) Apply a rotation transformation to this matrix that rotates the given normalizedfromDirdirection vector to point along the normalizedtoDir, and store the result indest.Apply scaling to this matrix by scaling the base axes by the givenxy.xandxy.yfactors, respectively.Apply scaling tothismatrix by scaling the base axes by the givenxy.xandxy.yfactors, respectively and store the result indest.Apply scaling to this matrix by scaling the base axes by the givenxyfactors.Matrix3x2d.scale(Vector2dc xy, Matrix3x2d dest) Apply scaling to this matrix by scaling the base axes by the givenxyfactors and store the result indest.Matrix3x2dc.scale(Vector2dc xy, Matrix3x2d dest) Apply scaling to this matrix by scaling the base axes by the givenxyfactors and store the result indest.Set this matrix to be a simple scale matrix which scales the base axes byxy.xandxy.yrespectively.Set the two columns of this matrix to the supplied vectors, respectively.Set thisVector2dto the values of v.Set thisVector2fto the values of v.Set thisVector2ito the values of v usingRoundingMode.TRUNCATErounding.Set thisVector2ito the values of v using the givenRoundingMode.Set the first two components from the givenvand the z component from the givenzSet the first two components from the givenvand the z component from the givenzSet the x and y components from the givenvand the z and w components to the givenzandw.Set the column at the givencolumnindex, starting with0.Set the row at the givenrowindex, starting with0.Matrix3x2d.setTranslation(Vector2dc offset) Set only the translation components of this matrix(m20, m21)to the given values(offset.x, offset.y).Subtractvfrom this vector.Subtractvfromthisvector and store the result indest.static booleanIntersectiond.testAarAar(Vector2dc minA, Vector2dc maxA, Vector2dc minB, Vector2dc maxB) Test whether the axis-aligned rectangle with minimum cornerminAand maximum cornermaxAintersects the axis-aligned rectangle with minimum cornerminBand maximum cornermaxB.static booleanIntersectiond.testAarCircle(Vector2dc min, Vector2dc max, Vector2dc center, double radiusSquared) Test whether the axis-aligned rectangle with minimum cornerminand maximum cornermaxintersects the circle with the givencenterand square radiusradiusSquared.static booleanIntersectiond.testAarLine(Vector2dc min, Vector2dc max, double a, double b, double c) Test whether the axis-aligned rectangle with minimum cornerminand maximum cornermaxintersects the line with the general equation a*x + b*y + c = 0.static booleanIntersectiond.testCircleCircle(Vector2dc centerA, double radiusSquaredA, Vector2dc centerB, double radiusSquaredB) Test whether the one circle with centercenterAand square radiusradiusSquaredAintersects the other circle with centercenterBand square radiusradiusSquaredB.static booleanIntersectiond.testCircleTriangle(Vector2dc center, double radiusSquared, Vector2dc v0, Vector2dc v1, Vector2dc v2) Test whether the circle with givencenterand square radiusradiusSquaredintersects the triangle with counter-clockwise verticesv0,v1,v2.static booleanIntersectiond.testPointTriangle(Vector2dc point, Vector2dc v0, Vector2dc v1, Vector2dc v2) Test whether the givenpointlies inside the triangle with the verticesv0,v1,v2.static booleanIntersectiond.testRayAar(Vector2dc origin, Vector2dc dir, Vector2dc min, Vector2dc max) Test whether the ray with the givenoriginand directiondirintersects the given axis-aligned rectangle specified as its minimum cornerminand maximum cornermax.static booleanIntersectiond.testRayCircle(Vector2dc origin, Vector2dc dir, Vector2dc center, double radiusSquared) Test whether the ray with the givenoriginand directiondirintersects the circle with the givencenterand square radius.Transform the given vector by this matrix and store the result indest.Matrix3x2d.transformDirection(Vector2dc v, Vector2d dest) Transform/multiply the given 2D-vector, as if it was a 3D-vector with z=0, by this matrix and store the result indest.Matrix3x2dc.transformDirection(Vector2dc v, Vector2d dest) Transform/multiply the given 2D-vector, as if it was a 3D-vector with z=0, by this matrix and store the result indest.Matrix3x2d.transformPosition(Vector2dc v, Vector2d dest) Transform/multiply the given 2D-vector, as if it was a 3D-vector with z=1, by this matrix and store the result indest.Matrix3x2dc.transformPosition(Vector2dc v, Vector2d dest) Transform/multiply the given 2D-vector, as if it was a 3D-vector with z=1, by this matrix and store the result indest.Matrix2d.transformTranspose(Vector2dc v, Vector2d dest) Matrix2dc.transformTranspose(Vector2dc v, Vector2d dest) Transform the given vector by the transpose of this matrix and store the result indest.Apply a translation to this matrix by translating by the given number of units in x and y.Matrix3x2d.translate(Vector2dc offset, Matrix3x2d dest) Apply a translation to this matrix by translating by the given number of units in x and y, and store the result indest.Matrix3x2dc.translate(Vector2dc offset, Matrix3x2d dest) Apply a translation to this matrix by translating by the given number of units in x and y, and store the result indest.Matrix3x2d.translateLocal(Vector2dc offset) Pre-multiply a translation to this matrix by translating by the given number of units in x and y.Matrix3x2d.translateLocal(Vector2dc offset, Matrix3x2d dest) Pre-multiply a translation to this matrix by translating by the given number of units in x and y and store the result indest.Matrix3x2dc.translateLocal(Vector2dc offset, Matrix3x2d dest) Pre-multiply a translation to this matrix by translating by the given number of units in x and y and store the result indest.Matrix3x2d.translation(Vector2dc offset) Set this matrix to be a simple translation matrix in a two-dimensional coordinate system.Matrix4d.unprojectInvRay(Vector2dc winCoords, int[] viewport, Vector3d originDest, Vector3d dirDest) Matrix4dc.unprojectInvRay(Vector2dc winCoords, int[] viewport, Vector3d originDest, Vector3d dirDest) Unproject the given window coordinateswinCoordsbythismatrix using the specified viewport and compute the origin and the direction of the resulting ray which starts at NDCz = -1.0and goes through NDCz = +1.0.Matrix4d.unprojectRay(Vector2dc winCoords, int[] viewport, Vector3d originDest, Vector3d dirDest) Matrix4dc.unprojectRay(Vector2dc winCoords, int[] viewport, Vector3d originDest, Vector3d dirDest) Unproject the given 2D window coordinateswinCoordsbythismatrix using the specified viewport and compute the origin and the direction of the resulting ray which starts at NDCz = -1.0and goes through NDCz = +1.0.ModifierConstructorDescriptionCreate a newMatrix2dand initialize its two columns using the supplied vectors.Create a newVector2dand initialize its components to the one of the given vector.Create a newVector2iand initialize its components to the rounded value of the given vector.Create a newVector3iwith the first two components from the givenvand the givenzand round using the givenRoundingMode.