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 TypeMethodDescriptionAddv
to this vector.Addv
to this vector and store the result indest
.double
double
Return the angle between this vector and the supplied vector.double
double
Return the distance between this andv
.double
Vector2d.distanceSquared
(Vector2dc v) double
Vector2dc.distanceSquared
(Vector2dc v) Return the distance squared between this andv
.Divide this byv
component-wise and store the result intodest
.double
double
Return the dot product of this vector andv
.boolean
boolean
Compare the vector components ofthis
vector with the given vector using the givendelta
and return whether all of them are equal within a maximum difference ofdelta
.static int
Intersectiond.findClosestPointOnTriangle
(Vector2dc v0, Vector2dc v1, Vector2dc v2, Vector2dc p, Vector2d result) Determine the closest point on the triangle with the verticesv0
,v1
,v2
between that triangle and the given pointp
and store that point into the givenresult
.Add the component-wise multiplication ofa * b
to this vector.Add the component-wise multiplication ofa * b
to this vector.Add the component-wise multiplication ofa * b
to this vector and store the result indest
.Add the component-wise multiplication ofa * b
to this vector and store the result indest
.static boolean
Intersectiond.intersectCircleCircle
(Vector2dc centerA, double radiusSquaredA, Vector2dc centerB, double radiusSquaredB, Vector3d intersectionCenterAndHL) Test whether the one circle with centercenterA
and square radiusradiusSquaredA
intersects the other circle with centercenterB
and 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 int
Intersectiond.intersectLineSegmentAar
(Vector2dc p0, Vector2dc p1, Vector2dc min, Vector2dc max, Vector2d result) Determine whether the undirected line segment with the end pointsp0
andp1
intersects the axis-aligned rectangle given as its minimum cornermin
and 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 int
Intersectiond.intersectPolygonRay
(Vector2dc[] vertices, double originX, double originY, double dirX, double dirY, Vector2d p) Determine whether the polygon specified by the given sequence ofvertices
intersects 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 int
Intersectiond.intersectRayAar
(Vector2dc origin, Vector2dc dir, Vector2dc min, Vector2dc max, Vector2d result) Determine whether the given ray with the givenorigin
and directiondir
intersects the axis-aligned rectangle given as its minimum cornermin
and 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 boolean
Intersectiond.intersectRayCircle
(Vector2dc origin, Vector2dc dir, Vector2dc center, double radiusSquared, Vector2d result) Test whether the ray with the givenorigin
and directiondir
intersects the circle with the givencenter
and 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 givenresult
vector.static double
Intersectiond.intersectRayLine
(Vector2dc origin, Vector2dc dir, Vector2dc point, Vector2dc normal, double epsilon) Test whether the ray with givenorigin
and directiondir
intersects the line containing the givenpoint
and 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 double
Intersectiond.intersectRayLineSegment
(Vector2dc origin, Vector2dc dir, Vector2dc a, Vector2dc b) Determine whether the ray with givenorigin
and directiondir
intersects the undirected line segment given by the two end pointsa
andb
, and return the value of the parameter t in the ray equation p(t) = origin + t * dir of the intersection point, if any.Linearly interpolatethis
andother
using the given interpolation factort
and store the result inthis
.Linearly interpolatethis
andother
using the given interpolation factort
and 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 ofdest
to 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 ofdest
to 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 normalizedfromDir
direction 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 normalizedfromDir
direction 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 normalizedfromDir
direction vector to point along the normalizedtoDir
, and store the result indest
.Apply scaling to this matrix by scaling the base axes by the givenxy.x
andxy.y
factors, respectively.Apply scaling tothis
matrix by scaling the base axes by the givenxy.x
andxy.y
factors, respectively and store the result indest
.Apply scaling to this matrix by scaling the base axes by the givenxy
factors.Matrix3x2d.scale
(Vector2dc xy, Matrix3x2d dest) Apply scaling to this matrix by scaling the base axes by the givenxy
factors and store the result indest
.Matrix3x2dc.scale
(Vector2dc xy, Matrix3x2d dest) Apply scaling to this matrix by scaling the base axes by the givenxy
factors and store the result indest
.Set this matrix to be a simple scale matrix which scales the base axes byxy.x
andxy.y
respectively.Set the two columns of this matrix to the supplied vectors, respectively.Set thisVector2d
to the values of v.Set thisVector2f
to the values of v.Set thisVector2i
to the values of v usingRoundingMode.TRUNCATE
rounding.Set thisVector2i
to the values of v using the givenRoundingMode
.Set the first two components from the givenv
and the z component from the givenz
Set the first two components from the givenv
and the z component from the givenz
Set the x and y components from the givenv
and the z and w components to the givenz
andw
.Set the column at the givencolumn
index, starting with0
.Set the row at the givenrow
index, starting with0
.Matrix3x2d.setTranslation
(Vector2dc offset) Set only the translation components of this matrix(m20, m21)
to the given values(offset.x, offset.y)
.Subtractv
from this vector.Subtractv
fromthis
vector and store the result indest
.static boolean
Intersectiond.testAarAar
(Vector2dc minA, Vector2dc maxA, Vector2dc minB, Vector2dc maxB) Test whether the axis-aligned rectangle with minimum cornerminA
and maximum cornermaxA
intersects the axis-aligned rectangle with minimum cornerminB
and maximum cornermaxB
.static boolean
Intersectiond.testAarCircle
(Vector2dc min, Vector2dc max, Vector2dc center, double radiusSquared) Test whether the axis-aligned rectangle with minimum cornermin
and maximum cornermax
intersects the circle with the givencenter
and square radiusradiusSquared
.static boolean
Intersectiond.testAarLine
(Vector2dc min, Vector2dc max, double a, double b, double c) Test whether the axis-aligned rectangle with minimum cornermin
and maximum cornermax
intersects the line with the general equation a*x + b*y + c = 0.static boolean
Intersectiond.testCircleCircle
(Vector2dc centerA, double radiusSquaredA, Vector2dc centerB, double radiusSquaredB) Test whether the one circle with centercenterA
and square radiusradiusSquaredA
intersects the other circle with centercenterB
and square radiusradiusSquaredB
.static boolean
Intersectiond.testCircleTriangle
(Vector2dc center, double radiusSquared, Vector2dc v0, Vector2dc v1, Vector2dc v2) Test whether the circle with givencenter
and square radiusradiusSquared
intersects the triangle with counter-clockwise verticesv0
,v1
,v2
.static boolean
Intersectiond.testPointTriangle
(Vector2dc point, Vector2dc v0, Vector2dc v1, Vector2dc v2) Test whether the givenpoint
lies inside the triangle with the verticesv0
,v1
,v2
.static boolean
Intersectiond.testRayAar
(Vector2dc origin, Vector2dc dir, Vector2dc min, Vector2dc max) Test whether the ray with the givenorigin
and directiondir
intersects the given axis-aligned rectangle specified as its minimum cornermin
and maximum cornermax
.static boolean
Intersectiond.testRayCircle
(Vector2dc origin, Vector2dc dir, Vector2dc center, double radiusSquared) Test whether the ray with the givenorigin
and directiondir
intersects the circle with the givencenter
and 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 coordinateswinCoords
bythis
matrix using the specified viewport and compute the origin and the direction of the resulting ray which starts at NDCz = -1.0
and 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 coordinateswinCoords
bythis
matrix using the specified viewport and compute the origin and the direction of the resulting ray which starts at NDCz = -1.0
and goes through NDCz = +1.0
.ModifierConstructorDescriptionCreate a newMatrix2d
and initialize its two columns using the supplied vectors.Create a newVector2d
and initialize its components to the one of the given vector.Create a newVector2i
and initialize its components to the rounded value of the given vector.Create a newVector3i
with the first two components from the givenv
and the givenz
and round using the givenRoundingMode
.