jaulib v1.3.0
Jau Support Library (C++, Java, ..)
|
Basic 4x4 value_type matrix implementation using fields for intensive use-cases (host operations). More...
#include <mat4f.hpp>
Public Types | |
typedef const value_type * | const_iterator |
typedef const value_type * | const_pointer |
typedef const value_type & | const_reference |
typedef value_type * | iterator |
typedef value_type * | pointer |
typedef Ray3F< value_type, std::is_floating_point_v< Value_type > > | Ray3 |
typedef value_type & | reference |
typedef Value_type | value_type |
typedef Vector3F< value_type, std::is_floating_point_v< Value_type > > | Vec3 |
typedef Vector4F< value_type, std::is_floating_point_v< Value_type > > | Vec4 |
Public Member Functions | |
constexpr | Matrix4 () noexcept |
Creates a new identity matrix. More... | |
constexpr | Matrix4 (const Matrix4 &o) noexcept |
Creates a new matrix copying the values of the given src matrix. More... | |
constexpr | Matrix4 (const_iterator m) noexcept |
Creates a new matrix based on given value_type[4*4] column major order. More... | |
constexpr | Matrix4 (std::initializer_list< value_type > m) noexcept |
Creates a new matrix based on given value_type initializer list in column major order. More... | |
constexpr iterator | begin () noexcept |
constexpr const_iterator | cbegin () const noexcept |
value_type | determinant () const noexcept |
Returns the determinant of this matrix. More... | |
constexpr bool | equals (const Matrix4 &o, const value_type epsilon=std::numeric_limits< value_type >::epsilon()) const noexcept |
constexpr value_type | get (const jau::nsize_t i) const noexcept |
Returns the i th component of the given column-major order matrix, 0 <= i < 16, w/o boundary check. More... | |
constexpr iterator | get (iterator dst) const noexcept |
Get this matrix into the given value_type[16] array in column major order w/o boundary check. More... | |
constexpr std::vector< value_type > & | get (std::vector< value_type > &dst, size_t dst_off) const noexcept |
Get this matrix into the given FloatBuffer in column major order. More... | |
constexpr Vec4 | getColumn (const jau::nsize_t column) const noexcept |
Get the named column of the given column-major matrix to v_out w/o boundary check. More... | |
constexpr Vec3 & | getColumn (const jau::nsize_t column, Vec3 &v_out) const noexcept |
Get the named column of the given column-major matrix to v_out w/o boundary check. More... | |
constexpr Vec4 & | getColumn (const jau::nsize_t column, Vec4 &v_out) const noexcept |
Get the named column of the given column-major matrix to v_out w/o boundary check. More... | |
constexpr Vec4 | getRow (const jau::nsize_t row) const noexcept |
Get the named column of the given column-major matrix to v_out w/o boundary check. More... | |
constexpr Vec3 & | getRow (const jau::nsize_t row, Vec3 &v_out) const noexcept |
Get the named row of the given column-major matrix to v_out w/o boundary check. More... | |
constexpr Vec4 & | getRow (const jau::nsize_t row, Vec4 &v_out) const noexcept |
Get the named row of the given column-major matrix to v_out w/ boundary check. More... | |
bool | invert () noexcept |
Invert this matrix. More... | |
bool | invert (const Matrix4 &src) noexcept |
Invert the src matrix values into this matrix. More... | |
constexpr Matrix4 & | load (const Matrix4 &src) noexcept |
Load the values of the given matrix src to this matrix w/o boundary check. More... | |
constexpr Matrix4 & | load (const_iterator src) noexcept |
Load the values of the given matrix src to this matrix w/o boundary check. More... | |
constexpr Matrix4 & | loadIdentity () noexcept |
Set this matrix to identity. More... | |
constexpr Matrix4 & | mul (const Matrix4 &a, const Matrix4 &b) noexcept |
Multiply matrix: [this] = [a] x [b]. More... | |
constexpr Matrix4 & | mul (const Matrix4 &b) noexcept |
Multiply matrix: [this] = [this] x [b]. More... | |
constexpr Vec3 & | mulVec3 (const Vec3 &v_in, Vec3 &v_out) const noexcept |
Affine 3f-vector transformation by 4x4 matrix. More... | |
constexpr Vec3 & | mulVec3 (Vec3 &v_inout) const noexcept |
Affine 3f-vector transformation by 4x4 matrix. More... | |
constexpr Vec4 & | mulVec4 (const Vec4 &v_in, Vec4 &v_out) const noexcept |
constexpr Vec4 & | mulVec4 (Vec4 &v_inout) const noexcept |
operator const_pointer () const noexcept | |
operator pointer () noexcept | |
constexpr Vec3 | operator* (const Vec3 &rhs) const noexcept |
Returns new Vec3, with affine 3f-vector transformation by this 4x4 matrix: this * v_in. More... | |
constexpr Vec4 | operator* (const Vec4 &rhs) const noexcept |
Returns new Vec4, with this * v_in. More... | |
constexpr Matrix4 & | operator*= (const Matrix4 &rhs) noexcept |
Multiply matrix: [this] = [this] x [b]. More... | |
constexpr Matrix4 & | operator*= (const value_type s) noexcept |
Multiply matrix with scalar: [this] = [this] x [s]. More... | |
constexpr Matrix4 & | operator= (const Matrix4 &o) noexcept |
Copy assignment using the the values of the given src matrix. More... | |
constexpr bool | operator== (const Matrix4 &rhs) const noexcept |
constexpr value_type | operator[] (size_t i) const noexcept |
Returns read-only i th component of the given column-major order matrix, 0 <= i < 16 w/o boundary check. More... | |
constexpr reference | operator[] (size_t i) noexcept |
Returns writable reference to the i th component of this column-major order matrix, 0 <= i < 16 w/o boundary check. More... | |
constexpr_cxx26 Matrix4 & | rotate (const value_type ang_rad, const value_type x, const value_type y, const value_type z, Matrix4 &tmp) noexcept |
Rotate this matrix about give axis and angle in radians, i.e. More... | |
constexpr_cxx26 Matrix4 & | rotate (const value_type ang_rad, const Vec3 &axis, Matrix4 &tmp) noexcept |
Rotate this matrix about give axis and angle in radians, i.e. More... | |
constexpr Matrix4 & | scale (const value_type s, Matrix4 &tmp) noexcept |
Scale this matrix, i.e. More... | |
constexpr Matrix4 & | scale (const value_type x, const value_type y, const value_type z, Matrix4 &tmp) noexcept |
Scale this matrix, i.e. More... | |
constexpr void | set (const jau::nsize_t i, const value_type v) noexcept |
Sets the i th component of this column-major order matrix with value_type v , 0 <= i < 16 w/o boundary check. More... | |
Matrix4 & | setToFrustum (const value_type left, const value_type right, const value_type bottom, const value_type top, const value_type zNear, const value_type zFar) |
Set this matrix to frustum. More... | |
constexpr Matrix4 & | setToLookAt (const Vec3 &eye, const Vec3 ¢er, const Vec3 &up, Matrix4 &tmp) noexcept |
Set this matrix to the look-at matrix based on given parameters. More... | |
constexpr Matrix4 & | setToOrtho (const value_type left, const value_type right, const value_type bottom, const value_type top, const value_type zNear, const value_type zFar) noexcept |
Set this matrix to orthogonal projection. More... | |
Matrix4 & | setToPerspective (const FovHVHalves &fovhv, const value_type zNear, const value_type zFar) |
Set this matrix to perspective frustum projection. More... | |
Matrix4 & | setToPerspective (const value_type fovy_rad, const value_type aspect, const value_type zNear, const value_type zFar) |
Set this matrix to perspective frustum projection. More... | |
constexpr bool | setToPick (const value_type x, const value_type y, const value_type deltaX, const value_type deltaY, const Recti &viewport, Matrix4 &mat4Tmp) noexcept |
Set this matrix to the pick matrix based on given parameters. More... | |
constexpr_cxx26 Matrix4 & | setToRotationAxis (const value_type ang_rad, const Vec3 &axis) noexcept |
Set this matrix to rotation from the given axis and angle in radians. More... | |
constexpr_cxx26 Matrix4 & | setToRotationAxis (const value_type ang_rad, value_type x, value_type y, value_type z) noexcept |
Set this matrix to rotation from the given axis and angle in radians. More... | |
constexpr_cxx26 Matrix4 & | setToRotationEuler (const value_type bankX, const value_type headingY, const value_type attitudeZ) noexcept |
Set this matrix to rotation from the given Euler rotation angles in radians. More... | |
constexpr_cxx26 Matrix4 & | setToRotationEuler (const Vec3 &angradXYZ) noexcept |
Set this matrix to rotation from the given Euler rotation angles in radians. More... | |
constexpr Matrix4 & | setToScale (const value_type x, const value_type y, const value_type z) noexcept |
Set this matrix to scale. More... | |
constexpr Matrix4 & | setToScale (const Vec3 &s) noexcept |
Set this matrix to scale. More... | |
constexpr Matrix4 & | setToTranslation (const value_type x, const value_type y, const value_type z) noexcept |
Set this matrix to translation. More... | |
constexpr Matrix4 & | setToTranslation (const Vec3 &t) noexcept |
Set this matrix to translation. More... | |
std::string | toString () const noexcept |
std::string | toString (const std::string &rowPrefix) const noexcept |
Returns a formatted string representation of this matrix. More... | |
std::string | toString (const std::string &rowPrefix, const std::string &f) const noexcept |
Returns a formatted string representation of this matrix. More... | |
constexpr Matrix4 & | translate (const value_type x, const value_type y, const value_type z, Matrix4 &tmp) noexcept |
Translate this matrix, i.e. More... | |
constexpr Matrix4 & | translate (const Vec3 &t, Matrix4 &tmp) noexcept |
Translate this matrix, i.e. More... | |
Matrix4 & | transpose () noexcept |
Transpose this matrix. More... | |
Matrix4 & | transpose (const Matrix4 &src) noexcept |
Transpose the given src matrix into this matrix. More... | |
Static Public Member Functions | |
static bool | mapObjToWin (const Vec3 &obj, const Matrix4 &mMv, const Matrix4 &mP, const Recti &viewport, Vec3 &winPos) noexcept |
Map object coordinates to window coordinates. More... | |
static bool | mapObjToWin (const Vec3 &obj, const Matrix4 &mPMv, const Recti &viewport, Vec3 &winPos) noexcept |
Map object coordinates to window coordinates. More... | |
static bool | mapWinToObj (const value_type winx, const value_type winy, const value_type winz, const Matrix4 &invPMv, const Recti &viewport, Vec3 &objPos) noexcept |
Map window coordinates to object coordinates. More... | |
static bool | mapWinToObj (const value_type winx, const value_type winy, const value_type winz, const Matrix4 &mMv, const Matrix4 &mP, const Recti &viewport, Vec3 &objPos, Matrix4 &mat4Tmp) noexcept |
Map window coordinates to object coordinates. More... | |
static bool | mapWinToObj (const value_type winx, const value_type winy, const value_type winz1, const value_type winz2, const Matrix4 &invPMv, const Recti &viewport, Vec3 &objPos1, Vec3 &objPos2) noexcept |
Map two window coordinates to two object coordinates, distinguished by their z component. More... | |
static bool | mapWinToObj4 (const value_type winx, const value_type winy, const value_type winz, const value_type clipw, const Matrix4 &invPMv, const Recti &viewport, const value_type near, const value_type far, Vec4 &objPos) noexcept |
Map window coordinates to object coordinates. More... | |
static bool | mapWinToObj4 (const value_type winx, const value_type winy, const value_type winz, const value_type clipw, const Matrix4 &mMv, const Matrix4 &mP, const Recti &viewport, const value_type near, const value_type far, Vec4 &objPos, Matrix4 &mat4Tmp) noexcept |
Map window coordinates to object coordinates. More... | |
static bool | mapWinToRay (const value_type winx, const value_type winy, const value_type winz0, const value_type winz1, const Matrix4 &invPMv, const Recti &viewport, Ray3 &ray) noexcept |
Map two window coordinates w/ shared X/Y and distinctive Z to a Ray . More... | |
static bool | mapWinToRay (const value_type winx, const value_type winy, const value_type winz0, const value_type winz1, const Matrix4 &mMv, const Matrix4 &mP, const Recti &viewport, Ray3 &ray, Matrix4 &mat4Tmp1) noexcept |
Map two window coordinates w/ shared X/Y and distinctive Z to a Ray . More... | |
Static Public Attributes | |
static constexpr const value_type | half = one/two |
static constexpr const value_type | inv_deviation = value_type(84) * std::numeric_limits<value_type>::epsilon() |
Inversion Epsilon, used with equals method to determine if two inverted matrices are close enough to be considered equal. More... | |
static constexpr const value_type | one = value_type(1) |
static constexpr const value_type | two = value_type(2) |
static constexpr const value_type | zero = value_type(0) |
Basic 4x4 value_type matrix implementation using fields for intensive use-cases (host operations).
Implementation covers FloatUtil
matrix functionality, exposed in an object oriented manner.
Unlike PMVmat4f
, this class only represents one single matrix.
For array operations the layout is expected in column-major order matching OpenGL's implementation, illustration:
Row-Major Column-Major (OpenGL): | 0 1 2 tx | | | | 4 5 6 ty | M = | | | 8 9 10 tz | | | | 12 13 14 15 | R C R C m[0*4+3] = tx; m[0+4*3] = tx; m[1*4+3] = ty; m[1+4*3] = ty; m[2*4+3] = tz; m[2+4*3] = tz; RC (std subscript order) RC (std subscript order) m03 = tx; m03 = tx; m13 = ty; m13 = ty; m23 = tz; m23 = tz;
Implementation utilizes unrolling of small vertices and matrices wherever possible while trying to access memory in a linear fashion for performance reasons, see:
typedef Value_type jau::math::Matrix4< Value_type, >::value_type |
typedef value_type* jau::math::Matrix4< Value_type, >::pointer |
typedef const value_type* jau::math::Matrix4< Value_type, >::const_pointer |
typedef value_type& jau::math::Matrix4< Value_type, >::reference |
typedef const value_type& jau::math::Matrix4< Value_type, >::const_reference |
typedef value_type* jau::math::Matrix4< Value_type, >::iterator |
typedef const value_type* jau::math::Matrix4< Value_type, >::const_iterator |
typedef Vector3F<value_type, std::is_floating_point_v<Value_type> > jau::math::Matrix4< Value_type, >::Vec3 |
typedef Vector4F<value_type, std::is_floating_point_v<Value_type> > jau::math::Matrix4< Value_type, >::Vec4 |
typedef Ray3F<value_type, std::is_floating_point_v<Value_type> > jau::math::Matrix4< Value_type, >::Ray3 |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineexplicitnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineexplicitnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Get this matrix into the given FloatBuffer
in column major order.
dst | 4x4 matrix std::vector in column-major order starting at dst_off |
dst_off | offset for matrix dst |
dst
for chaining
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Affine 3f-vector transformation by 4x4 matrix.
4x4 matrix multiplication with 3-component vector, using 1
for for v_in.w
and dropping v_out.w
, which shall be 1
.
v_in | 3-component column-vector vec3f , can be v_out for in-place transformation |
v_out | m_in * v_in, 3-component column-vector vec3f |
Definition at line 854 of file mat4f.hpp.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Affine 3f-vector transformation by 4x4 matrix.
4x4 matrix multiplication with 3-component vector, using 1
for for v_inout.w
and dropping v_inout.w
, which shall be 1
.
v_inout | 3-component column-vector vec3f input and output, i.e. in-place transformation |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlinenoexcept |
Set this matrix to rotation from the given axis and angle in radians.
Rotation matrix (Column Order): xx(1-c)+c xy(1-c)+zs xz(1-c)-ys 0 xy(1-c)-zs yy(1-c)+c yz(1-c)+xs 0 xz(1-c)+ys yz(1-c)-xs zz(1-c)+c 0 0 0 0 1
ang_rad | angle in radians |
x | x of rotation axis |
y | y of rotation axis |
z | z of rotation axis |
Definition at line 1002 of file mat4f.hpp.
|
inlinenoexcept |
Set this matrix to rotation from the given axis and angle in radians.
Rotation matrix (Column Order): xx(1-c)+c xy(1-c)+zs xz(1-c)-ys 0 xy(1-c)-zs yy(1-c)+c yz(1-c)+xs 0 xz(1-c)+ys yz(1-c)-xs zz(1-c)+c 0 0 0 0 1
ang_rad | angle in radians |
axis | rotation axis |
|
inlinenoexcept |
Set this matrix to rotation from the given Euler rotation angles in radians.
The rotations are applied in the given order:
bankX | the Euler pitch angle in radians. (rotation about the X axis) |
headingY | the Euler yaw angle in radians. (rotation about the Y axis) |
attitudeZ | the Euler roll angle in radians. (rotation about the Z axis) |
Implementation does not use Quaternion and hence is exposed to Gimbal-Lock, consider using Quaternion::toMatrix().
Definition at line 1080 of file mat4f.hpp.
|
inlinenoexcept |
Set this matrix to rotation from the given Euler rotation angles in radians.
The rotations are applied in the given order:
angradXYZ | euler angle vector in radians holding x-bank, y-heading and z-attitude |
Implementation does not use Quaternion and hence is exposed to Gimbal-Lock, consider using Quaternion::toMatrix().
|
inlineconstexprnoexcept |
|
inline |
Set this matrix to frustum.
Frustum matrix (Column Order): 2*zNear/dx 0 0 0 0 2*zNear/dy 0 0 A B C -1 0 0 D 0
left | |
right | |
bottom | |
top | |
zNear | |
zFar |
IllegalArgumentException | if zNear <= 0 or zFar <= zNear or left == right , or bottom == top . |
Definition at line 1202 of file mat4f.hpp.
|
inline |
Set this matrix to perspective frustum
projection.
fovy_rad | angle in radians |
aspect | aspect ratio width / height |
zNear | |
zFar |
IllegalArgumentException | if zNear <= 0 or zFar <= zNear |
Definition at line 1251 of file mat4f.hpp.
|
inline |
Set this matrix to perspective frustum
projection.
fovhv | FovHVHalves field of view in both directions, may not be centered, either in radians or tangent |
zNear | |
zFar |
IllegalArgumentException | if zNear <= 0 or zFar <= zNear |
|
inlineconstexprnoexcept |
Set this matrix to the look-at matrix based on given parameters.
Consist out of two matrix multiplications:
R = L x T, with L for look-at matrix and T for eye translation. Result R can be utilized for projection or modelview multiplication, i.e. M = M x R, with M being the projection or modelview matrix.
eye | 3 component eye vector |
center | 3 component center vector |
up | 3 component up vector |
tmp | temporary mat4f used for multiplication |
Definition at line 1299 of file mat4f.hpp.
|
inlineconstexprnoexcept |
Set this matrix to the pick matrix based on given parameters.
Traditional gluPickMatrix
implementation.
Consist out of two matrix multiplications:
R = T x S, with T for viewport translation matrix and S for viewport scale matrix. Result R can be utilized for projection multiplication, i.e. P = P x R, with P being the projection matrix.
To effectively use the generated pick matrix for picking, call setToPick(..)
and multiply a custom perspective matrix
by this pick matrix. Then you may load the result onto the perspective matrix stack.
x | the center x-component of a picking region in window coordinates |
y | the center y-component of a picking region in window coordinates |
deltaX | the width of the picking region in window coordinates. |
deltaY | the height of the picking region in window coordinates. |
viewport | Rect4i viewport |
mat4Tmp | temp storage |
|
inlinenoexcept |
Rotate this matrix about give axis and angle in radians, i.e.
multiply by axis-rotation matrix
.
angrad | angle in radians |
x | x of rotation axis |
y | y of rotation axis |
z | z of rotation axis |
tmp | temporary mat4f used for multiplication |
|
inlinenoexcept |
Rotate this matrix about give axis and angle in radians, i.e.
multiply by axis-rotation matrix
.
angrad | angle in radians |
axis | rotation axis |
tmp | temporary mat4f used for multiplication |
|
inlineconstexprnoexcept |
Translate this matrix, i.e.
multiply by translation matrix
.
x | x translation |
y | y translation |
z | z translation |
tmp | temporary mat4f used for multiplication |
|
inlineconstexprnoexcept |
Translate this matrix, i.e.
multiply by translation matrix
.
t | translation vec3f |
tmp | temporary mat4f used for multiplication |
|
inlineconstexprnoexcept |
Scale this matrix, i.e.
multiply by scale matrix
.
x | x scale |
y | y scale |
z | z scale |
tmp | temporary mat4f used for multiplication |
|
inlineconstexprnoexcept |
Scale this matrix, i.e.
multiply by scale matrix
.
s | scale for x-, y- and z-axis |
tmp | temporary mat4f used for multiplication |
|
inlinestaticnoexcept |
Map object coordinates to window coordinates.
Traditional gluProject
implementation.
obj | object position, 3 component vector |
mMv | modelview matrix |
mP | projection matrix |
viewport | Rect4i viewport |
winPos | 3 component window coordinate, the result |
|
inlinestaticnoexcept |
Map object coordinates to window coordinates.
Traditional gluProject
implementation.
obj | object position, 3 component vector |
mPMv | [projection] x [modelview] matrix, i.e. P x Mv |
viewport | Rect4i viewport |
winPos | 3 component window coordinate, the result |
|
inlinestaticnoexcept |
Map window coordinates to object coordinates.
Traditional gluUnProject
implementation.
winx | |
winy | |
winz | |
mMv | 4x4 modelview matrix |
mP | 4x4 projection matrix |
viewport | Rect4i viewport |
objPos | 3 component object coordinate, the result |
mat4Tmp | 16 component matrix for temp storage |
|
inlinestaticnoexcept |
Map window coordinates to object coordinates.
Traditional gluUnProject
implementation.
winx | |
winy | |
winz | |
invPMv | inverse [projection] x [modelview] matrix, i.e. Inv(P x Mv), if null method returns false |
viewport | Rect4i viewport |
objPos | 3 component object coordinate, the result |
|
inlinestaticnoexcept |
Map two window coordinates to two object coordinates, distinguished by their z component.
Traditional gluUnProject
implementation.
winx | |
winy | |
winz1 | |
winz2 | |
invPMv | inverse [projection] x [modelview] matrix, i.e. Inv(P x Mv), if null method returns false |
viewport | Rect4i viewport vector |
objPos1 | 3 component object coordinate, the result |
|
inlinestaticnoexcept |
Map window coordinates to object coordinates.
Traditional gluUnProject4
implementation.
winx | |
winy | |
winz | |
clipw | |
mMv | 4x4 modelview matrix |
mP | 4x4 projection matrix |
viewport | Rect4i viewport vector |
near | |
far | |
obj_pos | 4 component object coordinate, the result |
mat4Tmp | 16 component matrix for temp storage |
|
inlinestaticnoexcept |
Map window coordinates to object coordinates.
Traditional gluUnProject4
implementation.
winx | |
winy | |
winz | |
clipw | |
invPMv | inverse [projection] x [modelview] matrix, i.e. Inv(P x Mv), if null method returns false |
viewport | Rect4i viewport vector |
near | |
far | |
obj_pos | 4 component object coordinate, the result |
|
inlinestaticnoexcept |
Map two window coordinates w/ shared X/Y and distinctive Z to a Ray
.
The resulting Ray
maybe used for picking using a AABBox#getRayIntersection(vec3f, Ray, value_type, boolean)
.
Notes for picking winz0 and winz1:
FloatUtil#getZBufferEpsilon(int, value_type, value_type)
FloatUtil#getZBufferValue(int, value_type, value_type, value_type)
FloatUtil#getOrthoWinZ(value_type, value_type, value_type)
winx | |
winy | |
winz0 | |
winz1 | |
mMv | 4x4 modelview matrix |
mP | 4x4 projection matrix |
viewport | Rect4i viewport |
ray | storage for the resulting Ray |
mat4Tmp1 | 16 component matrix for temp storage |
mat4Tmp2 | 16 component matrix for temp storage |
|
inlinestaticnoexcept |
Map two window coordinates w/ shared X/Y and distinctive Z to a Ray
.
The resulting Ray
maybe used for picking using a AABBox#getRayIntersection(vec3f, Ray, value_type, boolean)
.
Notes for picking winz0 and winz1:
FloatUtil#getZBufferEpsilon(int, value_type, value_type)
FloatUtil#getZBufferValue(int, value_type, value_type, value_type)
FloatUtil#getOrthoWinZ(value_type, value_type, value_type)
winx | |
winy | |
winz0 | |
winz1 | |
invPMv | inverse [projection] x [modelview] matrix, i.e. Inv(P x Mv), if null method returns false |
viewport | Rect4i viewport |
ray | storage for the resulting Ray |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |