-
Notifications
You must be signed in to change notification settings - Fork 902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NF: More view and math tools #2870
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2870 +/- ##
==========================================
+ Coverage 42.77% 43.04% +0.26%
==========================================
Files 255 255
Lines 47425 48200 +775
Branches 8132 8174 +42
==========================================
+ Hits 20287 20747 +460
- Misses 24993 25305 +312
- Partials 2145 2148 +3
Continue to review full report at Codecov.
|
This pull request introduces 1 alert when merging 569abc2 into 5e1334f - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging fc887c3 into 5e1334f - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 7456df3 into ae4c720 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 4397a5a into 6e6e62f - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging a68af85 into 6f6ec9a - view on LGTM.com new alerts:
|
That's very odd error on Travis:
but |
Okay I'll fix it. |
Some additional view and math tools.
Changes to
viewtools
visualAngle
which computes visual angle using vector inputs.visible
andvisibleBBox
which are fast functions for testing whether points or bounding volumes are visible in the current projection.computeFrustumFOV
which gives a frustum much likegluPerspective
does.projectFrustum
andprojectFrustumToPlane
which is used to determine the dimensions of the projection of a frustum on a screen or surface. Used for determining the drawing area when viewing through an aperture, but more generally, the size of a plane the frustum projects to at some distance.Changes to
mathtools
normalMatrix
to compute the normal matrix used for lighting calculations in fragment shaders.fitBBox
andcomputeBBoxCorners
for fitting axis-aligned bounding boxes to a group of points or vertices. Used withvisible
andvisibleBBox
as well as the various raypicking routines in mathtools.multMatrix
for fast chain multiplication of matrices.rotationMatrix
andquatFromAxisAngle
now accepts string names as a shorthand for rotations about world axes (eg.-x
,+z
, etc.)scale
function for uniform and anisotropic scaling of points.accumQuat
for accumulating quaternion rotations. Used for forward-kinematics and armatures.zeroFix
to truncate numbers in arrays close to zero to zero.invertMatrix
to invert affine/orthogonal matrices faster. Also handles inverting other matrices with different shapes. Useful for color space transforms which typically have 3x3 matrices.isAffine
strictly works with only 4x4 matrices, raised no error before.articulate
for forward-kinematics.unproject
for getting object coordinates from screen and depth buffer coords.