Uses of Interface
org.joml.Vector2fc
Packages that use Vector2fc
-
Uses of Vector2fc in org.joml
Modifier and TypeMethodDescriptionVector2f.getToAddress
(long address) Vector2fc.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
.Addv
to this vector.Add the supplied vector to this one and store the result indest
.float
float
Return the angle between this vector and the supplied vector.static void
GeometryUtils.bitangent
(Vector3fc v1, Vector2fc uv1, Vector3fc v2, Vector2fc uv2, Vector3fc v3, Vector2fc uv3, Vector3f dest) Calculate the surface bitangent for the three supplied vertices and UV coordinates and store the result indest
.double
double
Return the distance between this andv
.float
float
Return the distance between this andv
.double
Vector2d.distanceSquared
(Vector2fc v) double
Vector2dc.distanceSquared
(Vector2fc v) Return the distance squared between this andv
.float
Vector2f.distanceSquared
(Vector2fc v) float
Vector2fc.distanceSquared
(Vector2fc v) Return the distance squared between this andv
.Divide this Vector3d component-wise by another Vector2fc.Divide this Vector2d component-wise by another Vector2f and store the result indest
.Divide this Vector2f component-wise by another Vector2fc.Divide this Vector2f component-wise by another Vector2fc and store the result indest
.float
float
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
Intersectionf.findClosestPointOnTriangle
(Vector2fc v0, Vector2fc v1, Vector2fc v2, Vector2fc p, Vector2f 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
Intersectionf.intersectCircleCircle
(Vector2fc centerA, float radiusSquaredA, Vector2fc centerB, float radiusSquaredB, Vector3f 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
Intersectionf.intersectLineSegmentAar
(Vector2fc p0, Vector2fc p1, Vector2fc min, Vector2fc max, Vector2f 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
Intersectionf.intersectPolygonRay
(Vector2fc[] vertices, float originX, float originY, float dirX, float dirY, Vector2f 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
Intersectionf.intersectRayAar
(Vector2fc origin, Vector2fc dir, Vector2fc min, Vector2fc max, Vector2f 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
Intersectionf.intersectRayCircle
(Vector2fc origin, Vector2fc dir, Vector2fc center, float radiusSquared, Vector2f 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 float
Intersectionf.intersectRayLine
(Vector2fc origin, Vector2fc dir, Vector2fc point, Vector2fc normal, float 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 float
Intersectionf.intersectRayLineSegment
(Vector2fc origin, Vector2fc dir, Vector2fc a, Vector2fc 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 Vector2f component-wise by another Vector2f.Multiply this Vector2f component-wise by another Vector2f and store the result indest
.Apply a rotation transformation to this matrix that rotates the given normalizedfromDir
direction vector to point along the normalizedtoDir
.Matrix3x2f.rotateTo
(Vector2fc fromDir, Vector2fc toDir, Matrix3x2f 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
.Matrix3x2fc.rotateTo
(Vector2fc fromDir, Vector2fc toDir, Matrix3x2f 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
(Vector2fc xy, Matrix3x2d dest) Apply scaling to this matrix by scaling the base axes by the givenxy
factors and store the result indest
.Matrix3x2dc.scale
(Vector2fc xy, Matrix3x2d dest) Apply scaling to this matrix by scaling the base axes by the givenxy
factors and store the result indest
.Apply scaling to this matrix by scaling the base axes by the givenxy
factors.Matrix3x2f.scale
(Vector2fc xy, Matrix3x2f dest) Apply scaling to this matrix by scaling the base axes by the givenxy
factors and store the result indest
.Matrix3x2fc.scale
(Vector2fc xy, Matrix3x2f 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 be a clone ofv
.Set thisVector2f
to the values of v.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
.Sets the first two components of this to the components of givenv
and last two components to the givenz
, andw
.Set the column at the givencolumn
index, starting with0
.Set the row at the givenrow
index, starting with0
.Subtractv
from this vector.Subtractv
fromthis
vector and store the result indest
.Subtractv
from this vector.Subtractv
fromthis
vector and store the result indest
.static void
GeometryUtils.tangent
(Vector3fc v1, Vector2fc uv1, Vector3fc v2, Vector2fc uv2, Vector3fc v3, Vector2fc uv3, Vector3f dest) Calculate the surface tangent for the three supplied vertices and UV coordinates and store the result indest
.static void
GeometryUtils.tangentBitangent
(Vector3fc v1, Vector2fc uv1, Vector3fc v2, Vector2fc uv2, Vector3fc v3, Vector2fc uv3, Vector3f destTangent, Vector3f destBitangent) Calculate the surface tangent and bitangent for the three supplied vertices and UV coordinates and store the result indest
.static boolean
Intersectionf.testAarAar
(Vector2fc minA, Vector2fc maxA, Vector2fc minB, Vector2fc 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
Intersectionf.testAarCircle
(Vector2fc min, Vector2fc max, Vector2fc center, float radiusSquared) Test whether the axis-aligned rectangle with minimum cornermin
and maximum cornermax
intersects the circle with the givencenter
and square radiusradiusSquared
.static boolean
Intersectionf.testAarLine
(Vector2fc min, Vector2fc max, float a, float b, float 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
Intersectionf.testCircleCircle
(Vector2fc centerA, float radiusSquaredA, Vector2fc centerB, float radiusSquaredB) Test whether the one circle with centercenterA
and square radiusradiusSquaredA
intersects the other circle with centercenterB
and square radiusradiusSquaredB
.static boolean
Intersectionf.testCircleTriangle
(Vector2fc center, float radiusSquared, Vector2fc v0, Vector2fc v1, Vector2fc v2) Test whether the circle with givencenter
and square radiusradiusSquared
intersects the triangle with counter-clockwise verticesv0
,v1
,v2
.boolean
FrustumIntersection.testPlaneXY
(Vector2fc min, Vector2fc max) Test whether the given XY-plane (atZ = 0
) is partly or completely within or outside of the frustum defined bythis
frustum culler.static boolean
Intersectionf.testPointTriangle
(Vector2fc point, Vector2fc v0, Vector2fc v1, Vector2fc v2) Test whether the givenpoint
lies inside the triangle with the verticesv0
,v1
,v2
.static boolean
Intersectionf.testRayAar
(Vector2fc origin, Vector2fc dir, Vector2fc min, Vector2fc 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
Intersectionf.testRayCircle
(Vector2fc origin, Vector2fc dir, Vector2fc center, float 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
.Matrix3x2f.transformDirection
(Vector2fc v, Vector2f 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
.Matrix3x2fc.transformDirection
(Vector2fc v, Vector2f 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
.Matrix3x2f.transformPosition
(Vector2fc v, Vector2f 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
.Matrix3x2fc.transformPosition
(Vector2fc v, Vector2f 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
.Matrix2f.transformTranspose
(Vector2fc v, Vector2f dest) Matrix2fc.transformTranspose
(Vector2fc v, Vector2f 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.Matrix3x2f.translate
(Vector2fc offset, Matrix3x2f dest) Apply a translation to this matrix by translating by the given number of units in x and y, and store the result indest
.Matrix3x2fc.translate
(Vector2fc offset, Matrix3x2f dest) Apply a translation to this matrix by translating by the given number of units in x and y, and store the result indest
.Matrix3x2f.translateLocal
(Vector2fc offset) Pre-multiply a translation to this matrix by translating by the given number of units in x and y.Matrix3x2f.translateLocal
(Vector2fc offset, Matrix3x2f 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
.Matrix3x2fc.translateLocal
(Vector2fc offset, Matrix3x2f 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
.Matrix3x2f.translation
(Vector2fc offset) Set this matrix to be a simple translation matrix in a two-dimensional coordinate system.Matrix4f.unprojectInvRay
(Vector2fc winCoords, int[] viewport, Vector3f originDest, Vector3f dirDest) Matrix4fc.unprojectInvRay
(Vector2fc winCoords, int[] viewport, Vector3f originDest, Vector3f 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
.Matrix4f.unprojectRay
(Vector2fc winCoords, int[] viewport, Vector3f originDest, Vector3f dirDest) Matrix4fc.unprojectRay
(Vector2fc winCoords, int[] viewport, Vector3f originDest, Vector3f 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 newMatrix2f
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 newVector2f
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
.Create a newVector4d
with the x and y components from the givenv
and the z and w components from the givenz
andw
.