jaulib v1.3.6
Jau Support Library (C++, Java, ..)
|
PMVMatrix4 implements the basic computer graphics Matrix4 pack using projection (P), modelview (Mv) and texture (T) Matrix4 operations. More...
#include <pmvmat4f.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 Matrix4< value_type, std::is_floating_point_v< Value_type > > | Mat4 |
typedef value_type * | pointer |
typedef Ray3F< value_type, std::is_floating_point_v< Value_type > > | Ray3 |
typedef value_type & | reference |
typedef SyncMatrix4< value_type, std::is_floating_point_v< Value_type > > | SyncMat4 |
typedef SyncMatrices4< value_type, std::is_floating_point_v< Value_type > > | SyncMats4 |
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 | |
PMVMatrix4 () noexcept | |
Creates an instance of PMVMatrix4. | |
PMVMatrix4 (int derivedMatrices) noexcept | |
Creates an instance of PMVMatrix4. | |
void | frustumP (const float left, const float right, const float bottom, const float top, const float zNear, const float zFar) |
Multiply the projection matrix with the frustum matrix. | |
constexpr uint32_t | getDirtyBits () noexcept |
Returns the dirty bits due to mutable operations, i.e. | |
jau::math::geom::Frustum | getFrustum () noexcept |
Returns the frustum, derived from projection x modelview. | |
constexpr uint32_t | getModifiedBits (const bool clear) noexcept |
Returns the modified bits due to mutable operations. | |
constexpr Mat4 & | getMulMvP (Mat4 &result) noexcept |
Returns multiplication result of Mv and P matrix, i.e. | |
constexpr Mat4 & | getMulPMv (Mat4 &result) noexcept |
Returns multiplication result of P and Mv matrix, i.e. | |
constexpr const Mat4 & | getMv () const noexcept |
constexpr Mat4 & | getMv () noexcept |
Returns the modelview matrix (Mv). | |
Mat4 & | getMvi () |
Returns the inverse modelview matrix (Mvi) if requested. | |
Mat4 & | getMvit () |
Returns the inverse transposed modelview matrix (Mvit) if requested. | |
constexpr const Mat4 & | getP () const noexcept |
constexpr Mat4 & | getP () noexcept |
Returns the projection matrix (P). | |
constexpr Mat4 & | getPMv () noexcept |
Returns the pre-multiplied projection x modelview, P x Mv. | |
constexpr Mat4 & | getPMvi () noexcept |
Returns the pre-multiplied inverse projection x modelview, if Mat4#invert(Mat4) succeeded, otherwise null . | |
constexpr uint32_t | getReqBits () noexcept |
Returns the request bit mask, which uses bit values equal to the dirty mask and may contain. | |
constexpr const SyncMats4 & | getSyncMv () const noexcept |
constexpr SyncMat4 & | getSyncMv () noexcept |
Returns the SyncMatrix of modelview matrix (Mv). | |
SyncMat4 & | getSyncMvi () |
Returns the SyncMatrix of inverse modelview matrix (Mvi) if requested. | |
SyncMat4 & | getSyncMvit () |
Returns the SyncMatrix of inverse transposed modelview matrix (Mvit) if requested. | |
constexpr const SyncMats4 & | getSyncP () const noexcept |
constexpr SyncMat4 & | getSyncP () noexcept |
Returns the SyncMatrix of projection matrix (P). | |
constexpr const SyncMats4f & | getSyncPMv () const noexcept |
constexpr SyncMats4f & | getSyncPMv () noexcept |
Returns SyncMatrices4f of 2 matrices within one FloatBuffer: P and Mv . | |
SyncMats4f & | getSyncPMvMvi () |
Returns SyncMatrices4f of 3 matrices within one FloatBuffer: P , Mv and Mvi if requested. | |
SyncMats4f & | getSyncPMvMviMvit () |
Returns SyncMatrices4f of 4 matrices within one FloatBuffer: P , Mv , Mvi and Mvit if requested. | |
constexpr const SyncMats4 & | getSyncT () const noexcept |
constexpr SyncMat4 & | getSyncT () noexcept |
Returns the SyncMatrix of texture matrix (T). | |
constexpr const Mat4 & | getT () const noexcept |
constexpr Mat4 & | getT () noexcept |
Returns the texture matrix (T). | |
constexpr bool | isReqDirty () noexcept |
Returns true if the one of the requested bits are are set dirty due to mutable operations, i.e. | |
constexpr PMVMatrix4 & | loadMv (const Mat4 &m) noexcept |
Load the modelview matrix with the values of the given Mat4 . | |
constexpr PMVMatrix4 & | loadMv (const Quat4f &quat) noexcept |
Load the modelview matrix with the values of the given Quaternion 's rotation Quaternion::toMatrix() representation. | |
constexpr PMVMatrix4 & | loadMv (float values[]) noexcept |
Load the modelview matrix with the provided values. | |
constexpr PMVMatrix4 & | loadMvIdentity () noexcept |
Load the modelview matrix with the values of the given Mat4 . | |
constexpr PMVMatrix4 & | loadP (const Mat4 &m) |
Load the projection matrix with the values of the given Mat4 . | |
constexpr PMVMatrix4 & | loadP (const Quat4f &quat) noexcept |
Load the projection matrix with the values of the given Quaternion 's rotation Quaternion::toMatrix() representation. | |
constexpr PMVMatrix4 & | loadP (float values[]) noexcept |
Load the projection matrix with the provided values. | |
constexpr PMVMatrix4 & | loadPIdentity () noexcept |
Load the projection matrix with the values of the given Mat4 . | |
constexpr PMVMatrix4 & | loadT (const Quat4f &quat) noexcept |
Load the texture matrix with the values of the given Quaternion 's rotation Quaternion::toMatrix() representation. | |
constexpr PMVMatrix4 & | loadT (float values[]) noexcept |
Load the texture matrix with the provided values. | |
constexpr PMVMatrix4 & | loadT (Mat4 &m) noexcept |
Load the texture matrix with the values of the given Mat4 . | |
constexpr PMVMatrix4 & | loadTIdentity () noexcept |
Load the texture matrix with the values of the given Mat4 . | |
constexpr PMVMatrix4 & | lookAtP (const Vec3 &eye, const Vec3 ¢er, const Vec3 &up) noexcept |
Multiply the projection matrix with the eye, object and orientation, i.e. | |
bool | mapObjToWin (const Vec3 &objPos, const Recti &viewport, Vec3 &winPos) noexcept |
Map object coordinates to window coordinates. | |
bool | mapWinToObj (const float winx, const float winy, const float winz, const Recti &viewport, Vec3 &objPos) noexcept |
Map window coordinates to object coordinates. | |
bool | mapWinToObj4 (const float winx, const float winy, const float winz, const float clipw, const Recti &viewport, const float near, const float far, Vec4 &objPos) noexcept |
Map window coordinates to object coordinates. | |
bool | mapWinToRay (const float winx, const float winy, const float winz0, const float winz1, const Recti &viewport, Ray3f &ray) noexcept |
Map two window coordinates w/ shared X/Y and distinctive Z to a Ray . | |
constexpr PMVMatrix4 & | mulMv (const Mat4 &m) noexcept |
Multiply the modelview matrix : [c] = [c] x [m]. | |
constexpr PMVMatrix4 & | mulP (const Mat4 &m) noexcept |
Multiply the projection matrix : [c] = [c] x [m]. | |
constexpr PMVMatrix4 & | mulT (const Mat4 &m) noexcept |
Multiply the texture matrix : [c] = [c] x [m]. | |
constexpr Vec3 & | mulWithMv (const Vec3 &v_in, Vec3 &v_out) noexcept |
v_out = Mv * v_in | |
constexpr Vec4 & | mulWithMv (const Vec4 &v_in, Vec4 &v_out) noexcept |
v_out = Mv * v_in | |
constexpr Vec4 & | mulWithMv (Vec4 &v_inout) noexcept |
v_inout = Mv * v_inout | |
constexpr void | orthoP (const float left, const float right, const float bottom, const float top, const float zNear, const float zFar) noexcept |
Multiply the projection matrix with the orthogonal matrix. | |
PMVMatrix4 & | perspectiveP (const float fovy_rad, const float aspect, const float zNear, const float zFar) |
Multiply the projection matrix with the perspective/frustum matrix. | |
constexpr_cxx20 PMVMatrix4 & | popMv () noexcept |
Pop the modelview matrix from its stack. | |
constexpr_cxx20 PMVMatrix4 & | popP () noexcept |
Pop the projection matrix from its stack. | |
constexpr_cxx20 PMVMatrix4 & | popT () noexcept |
Pop the texture matrix from its stack. | |
constexpr_cxx20 PMVMatrix4 & | pushMv () noexcept |
Push the modelview matrix to its stack, while preserving its values. | |
constexpr_cxx20 PMVMatrix4 & | pushP () noexcept |
Push the projection matrix to its stack, while preserving its values. | |
constexpr_cxx20 PMVMatrix4 & | pushT () noexcept |
Push the texture matrix to its stack, while preserving its values. | |
constexpr void | reset () noexcept |
Issues Mat4#loadIdentity() on all matrices and resets all internal states. | |
constexpr_cxx26 PMVMatrix4 & | rotateMv (const float ang_rad, const float x, const float y, const float z) noexcept |
Rotate the modelview matrix by the given axis and angle in radians. | |
constexpr_cxx26 PMVMatrix4 & | rotateMv (const float ang_rad, const Vec3 &axis) noexcept |
Rotate the modelview matrix by the given axis and angle in radians. | |
constexpr PMVMatrix4 & | rotateMv (const Quat4f &quat) noexcept |
Rotate the modelview matrix with the given Quaternion 's rotation matrix representation . | |
constexpr_cxx26 PMVMatrix4 & | rotateP (const float ang_rad, const float x, const float y, const float z) noexcept |
Rotate the projection matrix by the given axis and angle in radians. | |
constexpr_cxx26 PMVMatrix4 & | rotateP (const float ang_rad, const Vec3 &axis) noexcept |
Rotate the projection matrix by the given axis and angle in radians. | |
constexpr PMVMatrix4 & | rotateP (const Quat4f &quat) noexcept |
Rotate the projection matrix with the given Quaternion 's rotation matrix representation . | |
constexpr PMVMatrix4 & | scaleMv (const Vec3 &s) noexcept |
Scale the modelview matrix . | |
constexpr PMVMatrix4 & | scaleMv (float x, float y, float z) noexcept |
Scale the modelview matrix . | |
constexpr PMVMatrix4 & | scaleP (const Vec3 &s) noexcept |
Scale the projection matrix . | |
constexpr PMVMatrix4 & | scaleP (float x, float y, float z) noexcept |
Scale the projection matrix . | |
constexpr void | setModelviewDirty () noexcept |
Sets the Modelview (Mv) matrix dirty and modified, i.e. | |
constexpr void | setProjectionDirty () noexcept |
Sets the Projection (P) matrix dirty and modified, i.e. | |
constexpr void | setTextureDirty () noexcept |
Sets the Texture (T) matrix modified. | |
std::string | toString () const noexcept |
std::string & | toString (std::string &sb, const std::string &f) const noexcept |
constexpr PMVMatrix4 & | translateMv (const Vec3 &t) noexcept |
Translate the modelview matrix . | |
constexpr PMVMatrix4 & | translateMv (float x, float y, float z) noexcept |
Translate the modelview matrix . | |
constexpr PMVMatrix4 & | translateP (const Vec3 &t) noexcept |
Translate the projection matrix . | |
constexpr PMVMatrix4 & | translateP (float x, float y, float z) noexcept |
Translate the projection matrix . | |
bool | update () |
Update the derived inverse modelview (Mvi) , inverse transposed modelview (Mvit) matrices if they are dirty and requested via the constructor PMVMatrix4(int) . | |
Static Public Attributes | |
static constexpr const uint32_t | FRUSTUM = 1 << 3 |
Bit value for frustum and updated by getFrustum() . | |
static constexpr const uint32_t | INVERSE_MODELVIEW = 1 << 1 |
Bit value for inverse modelview matrix (Mvi) , updated via update() . | |
static constexpr const uint32_t | INVERSE_TRANSPOSED_MODELVIEW = 1 << 2 |
Bit value for inverse transposed modelview matrix (Mvit) , updated via update() . | |
static constexpr const uint32_t | MANUAL_BITS = FRUSTUM | PREMUL_PMV | PREMUL_PMVI |
Manual bits not covered by update() but getFrustum() , FRUSTUM , getPMv() , PREMUL_PMV , getPMvi() , PREMUL_PMVI , etc. | |
static constexpr const uint32_t | MODIFIED_ALL = MODIFIED_PROJECTION | MODIFIED_MODELVIEW | MODIFIED_TEXTURE |
Bit value stating all is modified. | |
static constexpr const uint32_t | MODIFIED_MODELVIEW = 1 << 1 |
Bit value stating a modified modelview matrix (Mv) , since last update() call. | |
static constexpr const uint32_t | MODIFIED_PROJECTION = 1 << 0 |
Bit value stating a modified projection matrix (P) , since last update() call. | |
static constexpr const uint32_t | MODIFIED_TEXTURE = 1 << 2 |
Bit value stating a modified texture matrix (T) , since last update() call. | |
static constexpr const uint32_t | PREMUL_PMV = 1 << 4 |
Bit value for pre-multiplied P * Mv , updated by getPMv() . | |
static constexpr const uint32_t | PREMUL_PMVI = 1 << 5 |
Bit value for pre-multiplied invert(P * Mv) , updated by getPMvi() . | |
PMVMatrix4 implements the basic computer graphics Matrix4 pack using projection (P), modelview (Mv) and texture (T) Matrix4 operations.
PMVMatrix4 provides the inverse modelview matrix (Mvi)
and inverse transposed modelview matrix (Mvit)
. Frustum
is also provided by getFrustum()
.
To keep these derived values synchronized after mutable Mv operations like rotateMv(Quaternion)
users have to call update()
before using Mvi and Mvit.
All matrices are provided in column-major order, as specified in the OpenGL fixed function pipeline, i.e. compatibility profile. See Matrix4.
PMVMatrix4 can supplement GL2ES2
applications w/ the lack of the described matrix functionality.
The native data layout of the matrices are preserved, linear and can be utilized by GLUniformData
directly to be pushed to the GPU eventually via SyncMatrix4 and SyncMatrices4, both SyncBuffer specializations for Matrix4.
SyncBuffer's provided sync_action_t
ensures that derived matrices, e.g. getMvi(), are updated before use.
SyncBuffer's sync_action_t
is called by GLUniformData::getBuffer()
i.e. before the data is pushed to the GPU.
Definition at line 81 of file pmvmat4f.hpp.
typedef Value_type jau::math::util::PMVMatrix4< Value_type, >::value_type |
Definition at line 83 of file pmvmat4f.hpp.
typedef value_type* jau::math::util::PMVMatrix4< Value_type, >::pointer |
Definition at line 84 of file pmvmat4f.hpp.
typedef const value_type* jau::math::util::PMVMatrix4< Value_type, >::const_pointer |
Definition at line 85 of file pmvmat4f.hpp.
typedef value_type& jau::math::util::PMVMatrix4< Value_type, >::reference |
Definition at line 86 of file pmvmat4f.hpp.
typedef const value_type& jau::math::util::PMVMatrix4< Value_type, >::const_reference |
Definition at line 87 of file pmvmat4f.hpp.
typedef value_type* jau::math::util::PMVMatrix4< Value_type, >::iterator |
Definition at line 88 of file pmvmat4f.hpp.
typedef const value_type* jau::math::util::PMVMatrix4< Value_type, >::const_iterator |
Definition at line 89 of file pmvmat4f.hpp.
typedef Vector3F<value_type, std::is_floating_point_v<Value_type> > jau::math::util::PMVMatrix4< Value_type, >::Vec3 |
Definition at line 91 of file pmvmat4f.hpp.
typedef Vector4F<value_type, std::is_floating_point_v<Value_type> > jau::math::util::PMVMatrix4< Value_type, >::Vec4 |
Definition at line 92 of file pmvmat4f.hpp.
typedef Ray3F<value_type, std::is_floating_point_v<Value_type> > jau::math::util::PMVMatrix4< Value_type, >::Ray3 |
Definition at line 93 of file pmvmat4f.hpp.
typedef Matrix4<value_type, std::is_floating_point_v<Value_type> > jau::math::util::PMVMatrix4< Value_type, >::Mat4 |
Definition at line 94 of file pmvmat4f.hpp.
typedef SyncMatrix4<value_type, std::is_floating_point_v<Value_type> > jau::math::util::PMVMatrix4< Value_type, >::SyncMat4 |
Definition at line 95 of file pmvmat4f.hpp.
typedef SyncMatrices4<value_type, std::is_floating_point_v<Value_type> > jau::math::util::PMVMatrix4< Value_type, >::SyncMats4 |
Definition at line 96 of file pmvmat4f.hpp.
|
inlinenoexcept |
Creates an instance of PMVMatrix4.
This constructor only sets up an instance w/o additional derived INVERSE_MODELVIEW or INVERSE_TRANSPOSED_MODELVIEW matrices.
Definition at line 206 of file pmvmat4f.hpp.
|
inlinenoexcept |
Creates an instance of PMVMatrix4.
Additional derived matrices can be requested via derivedMatrices
, i.e.
Implementation uses native Matrix4 elements using column-order fields. Derived matrices are updated at retrieval, e.g. getMvi(), or via synchronized access, e.g. getSyncMvi(), to the actual Mat4 instances.
derivedMatrices | additional matrices can be requested by passing bits INVERSE_MODELVIEW and INVERSE_TRANSPOSED_MODELVIEW . |
Definition at line 225 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Issues Mat4#loadIdentity()
on all matrices and resets all internal states.
Definition at line 235 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Returns the texture matrix
(T).
Consider using setTextureDirty()
if modifying the returned Mat4
.
Definition at line 257 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Definition at line 258 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Returns the SyncMatrix
of texture matrix
(T).
Definition at line 266 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Definition at line 267 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Returns the projection matrix
(P).
Consider using setProjectionDirty()
if modifying the returned Mat4
.
Definition at line 278 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Definition at line 279 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Returns the SyncMatrix
of projection matrix
(P).
Definition at line 287 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Definition at line 288 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Returns the modelview matrix
(Mv).
Consider using setModelviewDirty()
if modifying the returned Mat4
.
Definition at line 299 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Definition at line 300 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Returns the SyncMatrix
of modelview matrix
(Mv).
Definition at line 308 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Definition at line 309 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Returns SyncMatrices4f
of 2 matrices within one FloatBuffer: P
and Mv
.
Definition at line 317 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Definition at line 318 of file pmvmat4f.hpp.
|
inline |
Returns the inverse modelview matrix
(Mvi) if requested.
IllegalArgumentException | if INVERSE_MODELVIEW has not been requested in ctor PMVMatrix4(int) . |
Definition at line 327 of file pmvmat4f.hpp.
|
inline |
Returns the SyncMatrix
of inverse modelview matrix
(Mvi) if requested.
IllegalArgumentException | if INVERSE_MODELVIEW has not been requested in ctor PMVMatrix4(int) . |
Definition at line 342 of file pmvmat4f.hpp.
|
inline |
Returns the inverse transposed modelview matrix
(Mvit) if requested.
IllegalArgumentException | if INVERSE_TRANSPOSED_MODELVIEW has not been requested in ctor PMVMatrix4(int) . |
Definition at line 356 of file pmvmat4f.hpp.
|
inline |
Returns the SyncMatrix
of inverse transposed modelview matrix
(Mvit) if requested.
IllegalArgumentException | if INVERSE_TRANSPOSED_MODELVIEW has not been requested in ctor PMVMatrix4(int) . |
Definition at line 371 of file pmvmat4f.hpp.
|
inline |
Returns SyncMatrices4f
of 3 matrices within one FloatBuffer: P
, Mv
and Mvi
if requested.
IllegalArgumentException | if INVERSE_MODELVIEW has not been requested in ctor PMVMatrix4(int) . |
Definition at line 385 of file pmvmat4f.hpp.
|
inline |
Returns SyncMatrices4f
of 4 matrices within one FloatBuffer: P
, Mv
, Mvi
and Mvit
if requested.
IllegalArgumentException | if INVERSE_TRANSPOSED_MODELVIEW has not been requested in ctor PMVMatrix4(int) . |
Definition at line 399 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Returns multiplication result of P
and Mv
matrix, i.e.
result = P x Mv
result | 4x4 matrix storage for result |
Definition at line 418 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Returns multiplication result of Mv
and P
matrix, i.e.
result = Mv x P
result | 4x4 matrix storage for result |
Definition at line 430 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
v_out = Mv * v_in
v_in | input vector, can be v_out for in-place transformation |
v_out | output vector |
Definition at line 440 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
v_inout = Mv * v_inout
v_inout | input and output vector, i.e. in-place transformation |
Definition at line 449 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
v_out = Mv * v_in
Affine 3f-vector transformation by 4x4 matrix, see Mat4#mulVec3(Vec3, Vec3)
.
v_in | input vector, can be v_out for in-place transformation |
v_out | output vector |
Definition at line 462 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Load the modelview matrix
with the provided values.
Definition at line 473 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Load the modelview matrix
with the values of the given Mat4
.
Definition at line 481 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Load the modelview matrix
with the values of the given Quaternion
's rotation Quaternion::toMatrix() representation.
Definition at line 489 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Load the projection matrix
with the provided values.
Definition at line 498 of file pmvmat4f.hpp.
|
inlineconstexpr |
Load the projection matrix
with the values of the given Mat4
.
Definition at line 506 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Load the projection matrix
with the values of the given Quaternion
's rotation Quaternion::toMatrix() representation.
Definition at line 514 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Load the texture matrix
with the provided values.
Definition at line 523 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Load the texture matrix
with the values of the given Mat4
.
Definition at line 531 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Load the texture matrix
with the values of the given Quaternion
's rotation Quaternion::toMatrix() representation.
Definition at line 539 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Load the modelview matrix
with the values of the given Mat4
.
Definition at line 548 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Load the projection matrix
with the values of the given Mat4
.
Definition at line 557 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Load the texture matrix
with the values of the given Mat4
.
Definition at line 566 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Multiply the modelview matrix
: [c] = [c] x [m].
m | the right hand Mat4 |
Definition at line 577 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Multiply the projection matrix
: [c] = [c] x [m].
m | the right hand Mat4 |
Definition at line 588 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Multiply the texture matrix
: [c] = [c] x [m].
m | the right hand Mat4 |
Definition at line 599 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Translate the modelview matrix
.
x | |
y | |
z |
Definition at line 612 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Translate the modelview matrix
.
t | translation vec3 |
Definition at line 621 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Translate the projection matrix
.
x | |
y | |
z |
Definition at line 633 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Translate the projection matrix
.
t | translation vec3 |
Definition at line 642 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Scale the modelview matrix
.
x | |
y | |
z |
Definition at line 654 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Scale the modelview matrix
.
s | scale vec4f |
Definition at line 663 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Scale the projection matrix
.
x | |
y | |
z |
Definition at line 675 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Scale the projection matrix
.
s | scale vec4f |
Definition at line 684 of file pmvmat4f.hpp.
|
inlinenoexcept |
Rotate the modelview matrix
by the given axis and angle in radians.
Consider using rotateMv(Quaternion)
ang_rad | angle in radians |
axis | rotation axis |
Definition at line 699 of file pmvmat4f.hpp.
|
inlinenoexcept |
Rotate the modelview matrix
by the given axis and angle in radians.
Consider using rotateMv(Quaternion)
ang_rad | angle in radians |
axis | rotation axis |
Definition at line 713 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Rotate the modelview matrix
with the given Quaternion
's rotation matrix representation
.
quat | the Quaternion |
Definition at line 722 of file pmvmat4f.hpp.
|
inlinenoexcept |
Rotate the projection matrix
by the given axis and angle in radians.
Consider using rotateP(Quaternion)
ang_rad | angle in radians |
axis | rotation axis |
Definition at line 737 of file pmvmat4f.hpp.
|
inlinenoexcept |
Rotate the projection matrix
by the given axis and angle in radians.
Consider using rotateP(Quaternion)
ang_rad | angle in radians |
axis | rotation axis |
Definition at line 751 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Rotate the projection matrix
with the given Quaternion
's rotation matrix representation
.
quat | the Quaternion |
Definition at line 760 of file pmvmat4f.hpp.
|
inlinenoexcept |
Pop the modelview matrix
from its stack.
Definition at line 766 of file pmvmat4f.hpp.
|
inlinenoexcept |
Pop the projection matrix
from its stack.
Definition at line 772 of file pmvmat4f.hpp.
|
inlinenoexcept |
Pop the texture matrix
from its stack.
Definition at line 778 of file pmvmat4f.hpp.
|
inlinenoexcept |
Push the modelview matrix
to its stack, while preserving its values.
Definition at line 784 of file pmvmat4f.hpp.
|
inlinenoexcept |
Push the projection matrix
to its stack, while preserving its values.
Definition at line 789 of file pmvmat4f.hpp.
|
inlinenoexcept |
Push the texture matrix
to its stack, while preserving its values.
Definition at line 794 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Multiply
the projection matrix
with the orthogonal matrix.
left | |
right | |
bottom | |
top | |
zNear | |
zFar |
Definition at line 809 of file pmvmat4f.hpp.
|
inline |
Multiply
the projection matrix
with the frustum matrix.
IllegalArgumentException | if zNear <= 0 or zFar <= zNear or left == right , or bottom == top . |
Definition at line 821 of file pmvmat4f.hpp.
|
inline |
Multiply
the projection matrix
with the perspective/frustum matrix.
fovy_rad | fov angle in radians |
aspect | aspect ratio width / height |
zNear | |
zFar |
IllegalArgumentException | if zNear <= 0 or zFar <= zNear |
Definition at line 840 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Multiply
the projection matrix
with the eye, object and orientation, i.e.
Mat4#setToLookAt(Vec3, Vec3, Vec3, Mat4)
.
Definition at line 850 of file pmvmat4f.hpp.
|
inlinenoexcept |
Map object coordinates to window coordinates.
Traditional gluProject
implementation.
objPos | 3 component object coordinate |
viewport | Rect4i viewport |
winPos | 3 component window coordinate, the result |
Definition at line 868 of file pmvmat4f.hpp.
|
inlinenoexcept |
Map window coordinates to object coordinates.
Traditional gluUnProject
implementation.
winx | |
winy | |
winz | |
viewport | Rect4i viewport |
objPos | 3 component object coordinate, the result |
Definition at line 885 of file pmvmat4f.hpp.
|
inlinenoexcept |
Map window coordinates to object coordinates.
Traditional gluUnProject4
implementation.
winx | |
winy | |
winz | |
clipw | |
viewport | Rect4i viewport |
near | |
far | |
objPos | 4 component object coordinate, the result |
Definition at line 910 of file pmvmat4f.hpp.
|
inlinenoexcept |
Map two window coordinates w/ shared X/Y and distinctive Z to a Ray
.
The resulting Ray
maybe used for picking using a bounding box
.
Notes for picking winz0 and winz1:
FloatUtil#getZBufferEpsilon(int, float, float)
FloatUtil#getZBufferValue(int, float, float, float)
FloatUtil#getOrthoWinZ(float, float, float)
winx | |
winy | |
winz0 | |
winz1 | |
viewport | |
ray | storage for the resulting Ray |
Definition at line 939 of file pmvmat4f.hpp.
|
inlinenoexcept |
Definition at line 944 of file pmvmat4f.hpp.
|
inlinenoexcept |
|
inlineconstexprnoexcept |
Returns the modified bits due to mutable operations.
A modified bit is set, if the corresponding matrix had been modified by a mutable operation since last update()
or getModifiedBits(true)
call.
clear | if true, clears the modified bits, otherwise leaves them untouched. |
Definition at line 1025 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Returns the dirty bits due to mutable operations, i.e.
INVERSE_MODELVIEW
(if requested)INVERSE_TRANSPOSED_MODELVIEW
(if requested)FRUSTUM
(always, cleared via getFrustum()
A dirty bit is set, if the corresponding matrix had been modified by a mutable operation since last update()
call and requested in the constructor PMVMatrix4(int)
.
update()
clears the dirty state for the matrices and getFrustum()
for FRUSTUM
.
Definition at line 1058 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Returns true if the one of the requested bits
are are set dirty due to mutable operations, i.e.
at least one of
A dirty bit is set, if the corresponding matrix had been modified by a mutable operation since last update()
call and requested in the constructor PMVMatrix4(int)
.
update()
clears the dirty state for the matrices and getFrustum()
for FRUSTUM
.
Definition at line 1083 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Sets the Modelview (Mv)
matrix dirty and modified, i.e.
adds requested bits
and MANUAL_BITS
to dirty bits
.
Definition at line 1092 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Sets the Projection (P)
matrix dirty and modified, i.e.
adds MANUAL_BITS
to dirty bits
.
Definition at line 1101 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Sets the Texture (T)
matrix modified.
Definition at line 1109 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Returns the request bit mask, which uses bit values equal to the dirty mask and may contain.
The request bit mask is set by in the constructor PMVMatrix4(int)
.
Definition at line 1131 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Returns the pre-multiplied projection x modelview, P x Mv.
This Mat4
instance should be re-fetched via this method and not locally stored to have it updated from a potential modification of underlying projection and/or modelview matrix. update()
has no effect on this Mat4
.
This pre-multipled P x Mv is considered dirty, if its corresponding P matrix
or Mv matrix
has been modified since its last update.
Definition at line 1148 of file pmvmat4f.hpp.
|
inlineconstexprnoexcept |
Returns the pre-multiplied inverse projection x modelview, if Mat4#invert(Mat4)
succeeded, otherwise null
.
This Mat4
instance should be re-fetched via this method and not locally stored to have it updated from a potential modification of underlying projection and/or modelview matrix. update()
has no effect on this Mat4
.
This pre-multipled invert(P x Mv) is considered dirty, if its corresponding P matrix
or Mv matrix
has been modified since its last update.
Definition at line 1170 of file pmvmat4f.hpp.
|
inlinenoexcept |
Returns the frustum, derived from projection x modelview.
This Frustum
instance should be re-fetched via this method and not locally stored to have it updated from a potential modification of underlying projection and/or modelview matrix. update()
has no effect on this Frustum
.
The Frustum
is considered dirty, if its corresponding P matrix
or Mv matrix
has been modified since its last update.
Definition at line 1192 of file pmvmat4f.hpp.
|
inline |
Update the derived inverse modelview (Mvi)
, inverse transposed modelview (Mvit)
matrices if they are dirty
and requested via the constructor PMVMatrix4(int)
.
Hence updates the following dirty bits.
The Frustum
is updated only via getFrustum()
separately.
The Mvi and Mvit matrices are considered dirty, if their corresponding Mv matrix
has been modified since their last update.
Method is automatically called by SyncMat4
and SyncMatrices4f
instances SyncAction
as retrieved by e.g. getSyncMvit()
. This ensures an automatic update cycle if used with com.jogamp.opengl.GLUniformData
.
Method may be called manually in case mutable operations has been called and caller operates on already fetched references, i.e. not calling getMvi()
, getMvit()
anymore.
Method clears the modified bits like getModifiedBits(true)
, which are set by any mutable operation. The modified bits have no impact on this method, but the return value.
Definition at line 1246 of file pmvmat4f.hpp.
|
staticconstexpr |
Bit value stating a modified projection matrix (P)
, since last update()
call.
Definition at line 179 of file pmvmat4f.hpp.
|
staticconstexpr |
Bit value stating a modified modelview matrix (Mv)
, since last update()
call.
Definition at line 181 of file pmvmat4f.hpp.
|
staticconstexpr |
Bit value stating a modified texture matrix (T)
, since last update()
call.
Definition at line 183 of file pmvmat4f.hpp.
|
staticconstexpr |
Bit value stating all is modified.
Definition at line 185 of file pmvmat4f.hpp.
|
staticconstexpr |
Bit value for inverse modelview matrix (Mvi)
, updated via update()
.
Definition at line 187 of file pmvmat4f.hpp.
|
staticconstexpr |
Bit value for inverse transposed modelview matrix (Mvit)
, updated via update()
.
Definition at line 189 of file pmvmat4f.hpp.
|
staticconstexpr |
Bit value for frustum
and updated by getFrustum()
.
Definition at line 191 of file pmvmat4f.hpp.
|
staticconstexpr |
Bit value for pre-multiplied P * Mv
, updated by getPMv()
.
Definition at line 193 of file pmvmat4f.hpp.
|
staticconstexpr |
Bit value for pre-multiplied invert(P * Mv)
, updated by getPMvi()
.
Definition at line 195 of file pmvmat4f.hpp.
|
staticconstexpr |
Manual bits not covered by update()
but getFrustum()
, FRUSTUM
, getPMv()
, PREMUL_PMV
, getPMvi()
, PREMUL_PMVI
, etc.
Definition at line 197 of file pmvmat4f.hpp.