Add the supplied vector to this one.
Add the supplied vector to this one and store the result in dest
.
double
double
Return the angle between this vector and the supplied vector.
double
double
Return the cosine of the angle between this
vector and
the supplied vector.
double
double
Return the signed angle between this vector and the supplied vector with
respect to the plane with the given normal vector n
.
Apply an arcball view transformation to this matrix with the given radius
and center
position of the arcball and the specified X and Y rotation angles.
Apply an arcball view transformation to this matrix with the given radius
and center
position of the arcball and the specified X and Y rotation angles, and store the result in dest
.
Matrix4x3d.arcball(double radius,
Vector3dc center,
double angleX,
double angleY)
Apply an arcball view transformation to this matrix with the given radius
and center
position of the arcball and the specified X and Y rotation angles.
Apply an arcball view transformation to this matrix with the given radius
and center
position of the arcball and the specified X and Y rotation angles, and store the result in dest
.
Set this matrix to a cylindrical billboard transformation that rotates the local +Z axis of a given object with position objPos
towards
a target position at targetPos
while constraining a cylindrical rotation around the given up
vector.
Set this matrix to a cylindrical billboard transformation that rotates the local +Z axis of a given object with position objPos
towards
a target position at targetPos
while constraining a cylindrical rotation around the given up
vector.
Set this matrix to a spherical billboard transformation that rotates the local +Z axis of a given object with position objPos
towards
a target position at targetPos
using a shortest arc rotation by not preserving any up vector of the object.
Set this matrix to a spherical billboard transformation that rotates the local +Z axis of a given object with position objPos
towards
a target position at targetPos
.
Set this matrix to a spherical billboard transformation that rotates the local +Z axis of a given object with position objPos
towards
a target position at targetPos
using a shortest arc rotation by not preserving any up vector of the object.
Set this matrix to a spherical billboard transformation that rotates the local +Z axis of a given object with position objPos
towards
a target position at targetPos
.
Set this vector to be the cross product of this and v2.
Calculate the cross product of this and v2 and store the result in dest
.
double
double
Return the distance between this vector and v
.
double
double
Return the square of the distance between this vector and v
.
Divide this by v
component-wise and store the result into dest
.
double
double
Return the dot product of this vector and the supplied vector.
boolean
boolean
Compare the vector components of this
vector with the given vector using the given delta
and return whether all of them are equal within a maximum difference of delta
.
static int
Determine the closest point on the triangle with the vertices v0
, v1
, v2
between that triangle and the given point p
and store that point into the given result
.
Add the component-wise multiplication of a * b
to this vector.
Add the component-wise multiplication of a * b
to this vector.
Add the component-wise multiplication of a * b
to this vector
and store the result in dest
.
Add the component-wise multiplication of a * b
to this vector
and store the result in dest
.
Add the component-wise multiplication of a * b
to this vector
and store the result in dest
.
Set this quaternion to be a representation of the supplied axis and
angle (in degrees).
Set this quaternion to be a representation of the supplied axis and
angle (in radians).
Compute the half vector between this and the other vector.
Compute the half vector between this and the other vector and store the result in dest
.
Compute a hermite interpolation between this
vector and its
associated tangent t0
and the given vector v
with its tangent t1
and store the result in
dest
.
static int
Determine whether the undirected line segment with the end points p0
and p1
intersects the axis-aligned box given as its minimum corner min
and maximum corner max
,
and return the values of the parameter t in the ray equation p(t) = origin + p0 * (p1 - p0) of the near and far point of intersection.
static boolean
Determine whether the line segment with the end points p0
and p1
intersects the triangle consisting of the three vertices (v0X, v0Y, v0Z)
, (v1X, v1Y, v1Z)
and (v2X, v2Y, v2Z)
,
regardless of the winding order of the triangle or the direction of the line segment between its two end points,
and return the point of intersection.
static boolean
Test whether the ray with the given origin
and direction dir
intersects the axis-aligned box specified as its minimum corner min
and maximum corner max
,
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..
static double
Test whether the ray with given origin
and direction dir
intersects the plane
containing the given point
and having the given normal
, and return the
value of the parameter t in the ray equation p(t) = origin + t * dir of the intersection point.
static boolean
Test whether the ray with the given origin
and normalized direction dir
intersects the sphere with the given center
and square radius radiusSquared
,
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 given result
vector.
static double
Determine whether the ray with the given origin
and the given dir
intersects the triangle consisting of the three vertices
v0
, v1
and v2
and return the value of the parameter t in the ray equation p(t) = origin + t * dir of the point of intersection.
static double
Determine whether the ray with the given origin
and the given dir
intersects the frontface of the triangle consisting of the three vertices
v0
, v1
and v2
and return the value of the parameter t in the ray equation p(t) = origin + t * dir of the point of intersection.
static boolean
Test whether the one sphere with center centerA
and square radius radiusSquaredA
intersects the other
sphere with center centerB
and square radius radiusSquaredB
, and store the center of the circle of
intersection in the (x, y, z)
components of the supplied vector and the radius of that circle in the w component.
Linearly interpolate this
and other
using the given interpolation factor t
and store the result in this
.
Linearly interpolate this
and other
using the given interpolation factor t
and store the result in dest
.
Apply a rotation transformation to this matrix to make -z
point along dir
.
Apply a rotation transformation to this matrix to make -z
point along dir
and store the result in dest
.
Apply a rotation transformation to this matrix to make -z
point along dir
and store the result in dest
.
Apply a rotation transformation to this matrix to make -z
point along dir
.
Apply a rotation transformation to this matrix to make -z
point along dir
and store the result in dest
.
Apply a rotation transformation to this matrix to make -z
point along dir
and store the result in dest
.
Apply a rotation transformation to this matrix to make -z
point along dir
.
Apply a rotation transformation to this matrix to make -z
point along dir
and store the result in dest
.
Apply a rotation transformation to this matrix to make -z
point along dir
and store the result in dest
.
Apply a rotation to this quaternion that maps the given direction to the positive Z axis.
Apply a rotation to this quaternion that maps the given direction to the positive Z axis, and store the result in dest
.
Apply a "lookat" transformation to this matrix for a right-handed coordinate system,
that aligns -z
with center - eye
.
Apply a "lookat" transformation to this matrix for a right-handed coordinate system,
that aligns -z
with center - eye
and store the result in dest
.
Apply a "lookat" transformation to this matrix for a right-handed coordinate system,
that aligns -z
with center - eye
and store the result in dest
.
Apply a "lookat" transformation to this matrix for a right-handed coordinate system,
that aligns -z
with center - eye
.
Apply a "lookat" transformation to this matrix for a right-handed coordinate system,
that aligns -z
with center - eye
and store the result in dest
.
Apply a "lookat" transformation to this matrix for a right-handed coordinate system,
that aligns -z
with center - eye
and store the result in dest
.
Apply a "lookat" transformation to this matrix for a left-handed coordinate system,
that aligns +z
with center - eye
.
Apply a "lookat" transformation to this matrix for a left-handed coordinate system,
that aligns +z
with center - eye
and store the result in dest
.
Apply a "lookat" transformation to this matrix for a left-handed coordinate system,
that aligns +z
with center - eye
and store the result in dest
.
Apply a "lookat" transformation to this matrix for a left-handed coordinate system,
that aligns +z
with center - eye
.
Apply a "lookat" transformation to this matrix for a left-handed coordinate system,
that aligns +z
with center - eye
and store the result in dest
.
Apply a "lookat" transformation to this matrix for a left-handed coordinate system,
that aligns +z
with center - eye
and store the result in dest
.
Set the components of this vector to be the component-wise maximum of this and the other vector.
Set the components of dest
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 of dest
to be the component-wise minimum of this and the other vector.
Multiply this Vector3d component-wise by another Vector3dc.
Multiply this by v
component-wise and store the result into dest
.
Add the component-wise multiplication of this * a
to b
and store the result in this
.
Add the component-wise multiplication of this * a
to b
and store the result in this
.
Add the component-wise multiplication of this * a
to b
and store the result in dest
.
Add the component-wise multiplication of this * a
to b
and store the result in dest
.
Add the component-wise multiplication of this * a
to b
and store the result in dest
.
Transform this
vector so that it is orthogonal to the given vector v
and normalize the result.
Transform this
vector so that it is orthogonal to the given vector v
, normalize the result and store it into dest
.
Transform this
vector so that it is orthogonal to the given unit vector v
and normalize the result.
Transform this
vector so that it is orthogonal to the given unit vector v
, normalize the result and store it into dest
.
Project the given position
via this
matrix using the specified viewport
and store the resulting window coordinates in winCoordsDest
.
Project the given position
via this
matrix using the specified viewport
and store the resulting window coordinates in winCoordsDest
.
double
double
Apply a mirror/reflection transformation to this matrix that reflects through the given plane
specified via the plane normal.
Apply a mirror/reflection transformation to this matrix that reflects through the given plane
specified via the plane normal, and store the result in dest
.
Apply a mirror/reflection transformation to this matrix that reflects about a plane
specified via the plane orientation and a point on the plane.
Apply a mirror/reflection transformation to this matrix that reflects about the given plane
specified via the plane normal and a point on the plane.
Apply a mirror/reflection transformation to this matrix that reflects about a plane
specified via the plane orientation and a point on the plane, and store the result in dest
.
Apply a mirror/reflection transformation to this matrix that reflects about the given plane
specified via the plane normal and a point on the plane, and store the result in dest
.
Apply a mirror/reflection transformation to this matrix that reflects about a plane
specified via the plane orientation and a point on the plane.
Apply a mirror/reflection transformation to this matrix that reflects about the given plane
specified via the plane normal and a point on the plane.
Apply a mirror/reflection transformation to this matrix that reflects about a plane
specified via the plane orientation and a point on the plane, and store the result in dest
.
Apply a mirror/reflection transformation to this matrix that reflects about the given plane
specified via the plane normal and a point on the plane, and store the result in dest
.
Reflect this vector about the given normal vector.
Reflect this vector about the given normal vector and store the result in dest
.
Set this matrix to a mirror/reflection transformation that reflects through the given plane
specified via the plane normal.
Set this matrix to a mirror/reflection transformation that reflects about a plane
specified via the plane orientation and a point on the plane.
Set this matrix to a mirror/reflection transformation that reflects about the given plane
specified via the plane normal and a point on the plane.
Set this matrix to a mirror/reflection transformation that reflects about a plane
specified via the plane orientation and a point on the plane.
Set this matrix to a mirror/reflection transformation that reflects about the given plane
specified via the plane normal and a point on the plane.
Apply a rotation transformation, rotating the given radians about the specified axis, to this matrix.
Apply a rotation transformation, rotating the given radians about the specified axis and store the result in dest
.
Apply a rotation transformation, rotating the given radians about the specified axis and store the result in dest
.
Apply a rotation transformation, rotating the given radians about the specified axis, to this matrix.
Apply a rotation transformation, rotating the given radians about the specified axis and store the result in dest
.
Apply a rotation transformation, rotating the given radians about the specified axis and store the result in dest
.
Apply a rotation transformation, rotating the given radians about the specified axis, to this matrix.
Apply a rotation transformation, rotating the given radians about the specified axis and store the result in dest
.
Apply a rotation transformation, rotating the given radians about the specified axis and store the result in dest
.
Apply a rotation to this
quaternion rotating the given radians about the specified axis.
Apply a rotation to this
quaternion rotating the given radians about the specified axis
and store the result in dest
.
Apply a rotation to this
that rotates the fromDir
vector to point along toDir
.
Apply a rotation to this
that rotates the fromDir
vector to point along toDir
and
store the result in dest
.
Apply a model transformation to this matrix for a right-handed coordinate system,
that aligns the local +Z
axis with direction
.
Apply a model transformation to this matrix for a right-handed coordinate system,
that aligns the local +Z
axis with direction
and store the result in dest
.
Apply a model transformation to this matrix for a right-handed coordinate system,
that aligns the local +Z
axis with direction
and store the result in dest
.
Apply a model transformation to this matrix for a right-handed coordinate system,
that aligns the local +Z
axis with direction
.
Apply a model transformation to this matrix for a right-handed coordinate system,
that aligns the local +Z
axis with direction
and store the result in dest
.
Apply a model transformation to this matrix for a right-handed coordinate system,
that aligns the local +Z
axis with direction
and store the result in dest
.
Apply a model transformation to this matrix for a right-handed coordinate system,
that aligns the local +Z
axis with dir
.
Apply a model transformation to this matrix for a right-handed coordinate system,
that aligns the local +Z
axis with dir
and store the result in dest
.
Apply a model transformation to this matrix for a right-handed coordinate system,
that aligns the -z
axis with dir
and store the result in dest
.
Set this matrix to a rotation matrix which rotates the given radians about a given axis.
Set this matrix to a rotation matrix which rotates the given radians about a given axis.
Set this matrix to a rotation matrix which rotates the given radians about a given axis.
Set this
quaternion to a rotation that rotates the fromDir
vector to point along toDir
.
Compute the quaternion representing a rotation of this
vector to point along toDir
and store the result in dest
.
Set this matrix to a model transformation for a right-handed coordinate system,
that aligns the local -z
axis with center - eye
.
Set this matrix to a model transformation for a right-handed coordinate system,
that aligns the local -z
axis with dir
.
Set this matrix to a model transformation for a right-handed coordinate system,
that aligns the local -z
axis with dir
.
Apply scaling to this matrix by scaling the base axes by the given xyz.x
,
xyz.y
and xyz.z
factors, respectively.
Apply scaling to this
matrix by scaling the base axes by the given xyz.x
,
xyz.y
and xyz.z
factors, respectively and store the result in dest
.
Apply scaling to this matrix by scaling the base axes by the given xyz.x
,
xyz.y
and xyz.z
factors, respectively.
Apply scaling to this
matrix by scaling the base axes by the given xyz.x
,
xyz.y
and xyz.z
factors, respectively and store the result in dest
.
Apply scaling to this matrix by scaling the base axes by the given xyz.x
,
xyz.y
and xyz.z
factors, respectively.
Apply scaling to this
matrix by scaling the base axes by the given xyz.x
,
xyz.y
and xyz.z
factors, respectively and store the result in dest
.
Set this matrix to be a simple scale matrix which scales the base axes by xyz.x
, xyz.y
and xyz.z
respectively.
Set this matrix to be a simple scale matrix which scales the base axes by
xyz.x
, xyz.y
and xyz.z
, respectively.
Set this matrix to be a simple scale matrix which scales the base axes by
xyz.x
, xyz.y
and xyz.z
, respectively.
Set the three columns of this matrix to the supplied vectors, respectively.
Set the four columns of this matrix to the supplied vectors, respectively.
Set the x, y and z components to match the supplied vector.
Set the x, y and z components to match the supplied vector.
Set the x, y, and z components of this to the components of
v
and the w component to w
.
Set this quaternion to be a representation of the supplied axis and
angle (in radians).
Set the column at the given column
index, starting with 0
.
Set the column at the given column
index, starting with 0
.
Set this matrix to a rotation transformation to make -z
point along dir
.
Set this matrix to a rotation transformation to make -z
point along dir
.
Set this matrix to a rotation transformation to make -z
point along dir
.
Set this matrix to be a "lookat" transformation for a right-handed coordinate system, that aligns
-z
with center - eye
.
Set this matrix to be a "lookat" transformation for a right-handed coordinate system, that aligns
-z
with center - eye
.
Set this matrix to be a "lookat" transformation for a left-handed coordinate system, that aligns
+z
with center - eye
.
Set this matrix to be a "lookat" transformation for a left-handed coordinate system, that aligns
+z
with center - eye
.
Set the row at the given row
index, starting with 0
.
Set only the translation components (m30, m31, m32)
of this matrix to the given values (xyz.x, xyz.y, xyz.z)
.
Set only the translation components (m30, m31, m32)
of this matrix to the given values (xyz.x, xyz.y, xyz.z)
.
Compute a smooth-step (i.e. hermite with zero tangents) interpolation
between this
vector and the given vector v
and
store the result in dest
.
Subtract the supplied vector from this one.
Subtract the supplied vector from this one and store the result in dest
.
static boolean
Test whether the axis-aligned box with minimum corner minA
and maximum corner maxA
intersects the axis-aligned box with minimum corner minB
and maximum corner maxB
.
static boolean
Test whether the axis-aligned box with minimum corner min
and maximum corner max
intersects the plane with the general equation a*x + b*y + c*z + d = 0.
static boolean
Test whether the axis-aligned box with minimum corner min
and maximum corner max
intersects the sphere with the given center
and square radius radiusSquared
.
static boolean
Test whether the line segment with the end points p0
and p1
intersects the given sphere with center center
and square radius radiusSquared
.
static boolean
Test whether the line segment with the end points p0
and p1
intersects the triangle consisting of the three vertices (v0X, v0Y, v0Z)
, (v1X, v1Y, v1Z)
and (v2X, v2Y, v2Z)
,
regardless of the winding order of the triangle or the direction of the line segment between its two end points.
static boolean
Test whether the ray with the given origin
and direction dir
intersects the axis-aligned box specified as its minimum corner min
and maximum corner max
.
static boolean
Test whether the ray with the given origin
and normalized direction dir
intersects the sphere with the given center
and square radius.
static boolean
Test whether the ray with the given origin
and the given dir
intersects the frontface of the triangle consisting of the three vertices
v0
, v1
and v2
.
static boolean
Test whether the ray with the given origin
and the given dir
intersects the frontface of the triangle consisting of the three vertices
v0
, v1
and v2
.
static boolean
Test whether the one sphere with center centerA
and square radius radiusSquaredA
intersects the other
sphere with center centerB
and square radius radiusSquaredB
.
Transform the given vector by the rotation transformation described by this
AxisAngle4d
and store the result in
dest
.
Transform the given vector by this matrix and store the result in dest
.
Transform/multiply the given vector by this matrix by assuming a third row in this matrix of (0, 0, 1)
and store the result in dest
.
Transform/multiply the given vector by this matrix and store the result in dest
.
Transform the given vector by this quaternion and store the result in dest
.
Transform the given vector by this quaternion and store the result in dest
.
Transform the axis-aligned box given as the minimum corner
min
and maximum corner
max
by
this
affine
matrix and compute the axis-aligned box of the result whose minimum corner is stored in
outMin
and maximum corner stored in
outMax
.
Transform the axis-aligned box given as the minimum corner min
and maximum corner max
by this
matrix and compute the axis-aligned box of the result whose minimum corner is stored in outMin
and maximum corner stored in outMax
.
Transform/multiply the given 3D-vector, as if it was a 4D-vector with w=0, by
this matrix and store the result in dest
.
Transform/multiply the given 3D-vector, as if it was a 4D-vector with w=0, by
this matrix and store the result in dest
.
Transform the given vector by the inverse of this quaternion and store the result in dest
.
Transform the given vector by the inverse of this quaternion and store the result in dest
.
Transform the given vector by the inverse of this unit quaternion and store the result in dest
.
Transform the given vector by the inverse of this unit quaternion and store the result in dest
.
Transform/multiply the given 3D-vector, as if it was a 4D-vector with w=1, by
this matrix and store the result in dest
.
Transform/multiply the given 3D-vector, as if it was a 4D-vector with w=1, by
this matrix and store the result in dest
.
Transform/multiply the given vector by this matrix, perform perspective divide and store the result in dest
.
Transform the given vector by the transpose of this matrix and store the result in dest
.
Transform the given vector by this unit quaternion and store the result in dest
.
Transform the given vector by this unit quaternion and store the result in dest
.
Apply a translation to this matrix by translating by the given number of
units in x, y and z.
Apply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in dest
.
Apply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in dest
.
Apply a translation to this matrix by translating by the given number of
units in x, y and z.
Apply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in dest
.
Apply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in dest
.
Pre-multiply a translation to this matrix by translating by the given number of
units in x, y and z.
Pre-multiply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in dest
.
Pre-multiply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in dest
.
Pre-multiply a translation to this matrix by translating by the given number of
units in x, y and z.
Pre-multiply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in dest
.
Pre-multiply a translation to this matrix by translating by the given number of
units in x, y and z and store the result in dest
.
Set this matrix to be a simple translation matrix.
Set this matrix to be a simple translation matrix.
Set this
matrix to T * R * S
, where T
is the given translation
,
R
is a rotation transformation specified by the given quaternion, and S
is a scaling transformation
which scales all three axes by scale
.
Set this
matrix to T * R * S
, where T
is the given translation
,
R
is a rotation transformation specified by the given quaternion, and S
is a scaling transformation
which scales the axes by scale
.
Set this
matrix to T * R * S
, where T
is the given translation
,
R
is a rotation transformation specified by the given quaternion, and S
is a scaling transformation
which scales the axes by scale
.
Set this
matrix to (T * R * S)^{-1}
, where T
is the given translation
,
R
is a rotation transformation specified by the given quaternion, and S
is a scaling transformation
which scales all three axes by scale
.
Set this
matrix to (T * R * S)^{-1}
, where T
is the given translation
,
R
is a rotation transformation specified by the given quaternion, and S
is a scaling transformation
which scales the axes by scale
.
Set this
matrix to T * R * S * M
, where T
is the given translation
,
R
is a rotation transformation specified by the given quaternion, S
is a scaling transformation
which scales the axes by scale
.
Set this matrix to a model transformation for a right-handed coordinate system,
that translates to the given pos
and aligns the local -z
axis with dir
.
Set this matrix to a model transformation for a right-handed coordinate system,
that translates to the given pos
and aligns the local -z
axis with dir
.
Unproject the given window coordinates winCoords
by this
matrix using the specified viewport.
Unproject the given window coordinates winCoords
by this
matrix using the specified viewport.
Unproject the given window coordinates winCoords
by this
matrix using the specified viewport.
Unproject the given window coordinates winCoords
by this
matrix using the specified viewport.