aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/math
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1202 (related): Fix SEMVER regressions mostly due to Bug 1202 commits ↵Sven Gothel2015-08-291-0/+1
| | | | | | | | | (adding dummy methods) Commits deff49c901915e007f43a1df1a0d217a786e9f06 and 6ab634654f58afcf4549fcd1a796a0f9fd13298c changed/removed a few protected methods of public classes .. Re-added dummy methods .. shall be removed for next 2.4.* version
* FloatUtil: Remove '@deprecated' for 'matrixToString' 'FloatBuffer' variantSven Gothel2015-08-291-1/+0
|
* Refine Frustum definition: Adding Frustum.FovDesc; Clarify makeFrustum ↵Sven Gothel2015-07-204-32/+97
| | | | argument constraints -> Exceptions
* Bug 682 - Relocating javax.media.opengl.* -> com.jogamp.opengl.* (Part 1)Sven Gothel2015-02-022-3/+3
| | | | | | | | | sed -i 's/javax\.media\.opengl/com\.jogamp\.opengl/g' `grep -Rl "javax\.media\.opengl" src` sed -i 's/javax\.media\.nativewindow/com\.jogamp\.nativewindow/g' `grep -Rl "javax\.media\.nativewindow" src` sed -i 's/javax\/media\//com\/jogamp\//g' `grep -Rl "javax/media/" src` sed -i 's/javax\/media\//com\/jogamp\//g' `grep -Rl "javax/media/" doc` Manually edited all occurences within make/**
* FloatUtil.makeFrustum(..): Add throws GLException API doc / Add GLException ↵Sven Gothel2014-10-252-8/+30
| | | | | | | | | | | | | if zNear == zFar throws GLException with GL_INVALID_VALUE if zNear is <= 0, or zFar < 0, or if left == right, or bottom == top, or zNear == zFar Add note on callers: - FloatUtil.makePerspective(..) - Matrix4.* - PMVMatrix.* - ProjectFloat.*
* Graph/Math: Fix minor apidoc issuesSven Gothel2014-10-094-14/+28
|
* Findbugs.normal: Adding safeguard hashCode() implementation throwing ↵Sven Gothel2014-07-082-0/+8
| | | | | | InternalError("hashCode not designed") As long we don't use Object.hashCode() to idenitify the memory address, we can safeguard the code.
* Bug 1021: Add GenericStereoDevice* Supporting custom configurations; Hook-in ↵Sven Gothel2014-07-073-11/+128
| | | | | | | | | | | | | | | | | | | | | | oculusvr-sdk java distortion-mesh calculation if available StereoDeviceFactory support new GenericStereoDeviceFactory, with it's GenericStereoDevice and GenericStereoDeviceRenderer. GenericStereoDevice maintains different configurations, triggered either by passing a GenericStereoDevice.Config instance directly or by the device-index parameter: - 0: monoscopi device: No post-processing - 1: stereoscopic device SBS: No post-processing - 2: stereoscopic device SBS + Lenses: Distortion post-processing (only available w/ oculusvr-sdk sub-module) Producing a 'GenericStereoDevice.Config' instance is self containing and may extend if supporting more device types like top-bottom, interlaced etc. StereoDemo01 handles all use-cases and may be used as a test-bed to add and experiment with stereoscopy, devices and settings.
* Fix FloatUtil.makePerspective(..): The tan(fovy/2) shall be used, not ↵Sven Gothel2014-07-052-57/+47
| | | | | | | | | | | | | tan(fovy), fix callers; Simplify FloatUtil.makePerspective(..FovHVHalves..) Fix FloatUtil.makePerspective(..): The tan(fovy/2) shall be used, not tan(fovy), fix callers - This bug didn't hit (yet), since callers already performed the division (degree -> radian) by falsly claiming the passed value is in radian - where it was actually fov/2 in radians. Simplify FloatUtil.makePerspective(..FovHVHalves..) - Due to the fix above, it became pretty clear that the makeFrustum(..) method can be utilized. Simply apply all our tan-half-fov values on zNear.
* Code Clean-Up based on our Recommended Settings (jogamp-scripting ↵Sven Gothel2014-07-037-46/+48
| | | | | | | | | | | | | c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) - Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines
* FloatUtil.makePick(..): Refine API doc, incl. PMVMatrix.gluPickMatrix(..)Sven Gothel2014-07-031-4/+10
|
* Bug 1021: Refine Stereo Rendering API and OculusVR implementing rendererSven Gothel2014-07-033-25/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refine API in regards to proper package names, interface and high-level access to eye specific constant parameter and variable eye movement. +++ Commit 36327e24cf586b50bf18e87d7d13d53eb41cf1d9 introduced 'GLEventListener2' Move javax.media.opengl.GLEventListener2 -> com.jogamp.opengl.util.CustomRendererListener -> com.jogamp.opengl.util.stereo.StereoRendererListener StereoRendererListener adds stereoscopic specific: public void reshapeEye(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height, final EyeParameter eyeParam, final EyePose eyePose); .. see below. ++ Add com.jogamp.opengl.util.stereo: - EyeParameter (Constant eye parameters, like IPD and FOV) - EyePose (Current eye position and orientation) +++ Add com.jogamp.opengl.math.FovHVHalves to support non-centered bi-directional FOV for lenses. Add respective FloatUtil.makePerspective(.. FovHVHalves fovhv ) variant. +++
* Bug 1021: Add OculusVR distortion renderer (single FBO and dual FBO); Add ↵Sven Gothel2014-07-012-21/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | GLEventListener2 (WIP); Refine FloatUtil - GLEventListener2 extends GLEventListener adds refined control: - display w/ flags, i.e. repeat, don't clear - setProjectionModelview(..) - FloatUtil.* Add return value for chaining, where missing +++ - jogamp.opengl.oculusvr.OVRDistortion - Handles all OVR related data and maps it to shader + GL buffers - display method - com.jogamp.opengl.oculusvr.OVRSBSRendererSingleFBO implements GLEventListener - Simple OVRDistortion renderer using single FBO - Using upstream GLEventListener2 (the content) - com.jogamp.opengl.oculusvr.OVRSBSRendererDualFBO implements GLEventListener - Simple OVRDistortion renderer using two FBOs - Using upstream GLEventListener2 (the content) Manual Test: com.jogamp.opengl.test.junit.jogl.stereo.ovr.OVRDemo01
* WIP: Add Matrix4 OO wraper for FloatUtil matrix operationsSven Gothel2014-06-281-0/+151
|
* Enhance FloatUtil: More optimizations, concludes commit ↵Sven Gothel2014-06-282-567/+550
| | | | | | | | | | | | | | | | | 0bded476868c5fdfe44502bfd55957469d0d72bb FloatUtil optimizations (unroll and linear memeory access): - transposeMatrix - invertMatrix (diff algo as well - 50% speed bump) - multMatrix - multMatrixVec FloatUtil added - matrixDeterminant(..) FloatUtil removed - Certain FloatBuffer variants are removed or at least marked deprecated.
* Enhance FloatUtil: Merge ProjectFloat features while adding optimized ↵Sven Gothel2014-06-275-245/+1478
| | | | | | | | | | | | | | | | | | variations; PMVMatrix: Remove NIO buffer path, use backing-array only and FloatUtil direct. - FloatUtil pptimized variants: - mapObjToWinCoords (gluProject) passing 'P x Mv' for batch operations - mapWinToObjCoords (gluUnProject) passing 'Inv(P x Mv)' for batch operations - mapWinToObjCoords (gluUnProject) passing 'Inv(P x Mv)' and two winz values for two ray picking resulting in two obj positions. (-> mapWinToRay) - PMVMatrix - dropped low performance NIO mode - simply use common backing-array and fixed offsets directly - drop ProjectFloat usage in favor of FloatUtil - reduce number of temporary arrays
* VectorUtil: Fix method names, i.e. use type-suffix in end of function for ↵Sven Gothel2014-04-093-73/+73
| | | | clarity and unique method naming
* Add AABBox.getRayIntersection(..), VectorUtil.line2PlaneIntersection(..) ↵Sven Gothel2014-04-093-1/+318
| | | | | | | incl. getNormal*(..) and getPlane*(..) AABBox.getRayIntersection(..) provides the intersecting coordinates, where the fast alternative AABBox.intersectsRay(..) does not.
* Fix Quaternion.rotateByEuler(..): Zero rotation shall lead to NOP instead of ↵Sven Gothel2014-04-091-2/+2
| | | | setting identity
* Bug 801: Reduce temp. object creation, i.e. GC loadSven Gothel2014-04-021-11/+30
|
* Bug 801: WIP 2/2 - Add color attribute; Switch Shader instead of branching ↵Sven Gothel2014-04-021-0/+162
| | | | | | | | | | | | | | in shader; Update attributes and uniforms manually, drop ShaderState; - Due to shader-switching, 'renderModes' are now local to Region, e.g. UIShape etc - Remove RegionRenderer.renderModes - VBORegion2P*: - Use simple 2x float matrix for orthogonal P+Mv - Cleanup shader
* Bug 801: WIP 1/2 - Add color attribute; Switch Shader instead of branching ↵Sven Gothel2014-04-011-15/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in shader; Update attributes and uniforms manually, drop ShaderState; - ShaderCode - add int insertShaderSource(int shaderIdx, int position, Class<?> context, String path) - insertShaderSource(..): pos==-1 -> append code - VectorUtil - add isVec3InTriangle3(..., float epsilon) - add testSeg2SegIntersection(..., float epsilon) - add testTri2SegIntersection(..., float epsilon) - AffineTransform: Return result for chaining - Font - Add pixel precise 'getPointsBounds(final AffineTransform transform, CharSequence string, float pixelSize)' - Rename getString*() -> getMetric*() - OTGlyph: Release _points field, no more used - - Graph Triangulation - Count additional vertices in: Triangulator, CDTriangulator2D - OutlineShape: - Allow skipping of 'transformOutlines2Quadratic', i.e. allow tagging OutlineShape to be quadratic_nurbs via 'setIsQuadraticNurbs()' - Clarify cleanup ot outlines in same method 'cleanupOutlines()' - Count additional vertices .. - Graph Shader: - Start splitting and segmenting shader code for: - pass1 / pass2 - features, i.e. sampleCont, color-channel, ..
* Bug 801: Revise Graph VBAA (Add border dropping MSAA; Test diff. AA modes ↵Sven Gothel2014-03-222-14/+86
| | | | | | | | | | | | | | | | | | | | incl. FXAA2) ; Test exp. LineAA ; Misc Changes - Revise VBAA - Add border to FBO dropping MSAA - This automatically gives AA for edges on FBO boundary - Correcting ceil-diff, use object-diff instead of win-diff (diff := ceil(a)-a, w/ float a) - Reorg shader - using includes to test diff. AA modes: - [poles, wholeedge] * [equalweight, propweight] - fxaa2 - Exp. LineAA (disabled) - Test ROESSLER-2012-OGLES for detected rectangles only - Test boundary line detection See screenshots: <http://jogamp.org/files/screenshots/graphui/20140322/>
* AABBox: Add rotate(..)Sven Gothel2014-03-171-22/+75
|
* Quaternion: Add rotateByEuler(..); AABBox: Add translate(..); Minor edits ..Sven Gothel2014-03-174-36/+110
|
* Add generic support for picking via raycast intersection and AABBox (or similar)Sven Gothel2014-03-163-4/+123
| | | | | | | | | - New simple type Ray, denominating a .. ray - Added PMVMatrix.gluUnProjectRay(..) similar to gluUnproject(..) however, result is a Ray. - Added AABBox.intersectsRay(Ray) ..
* FloatUtil/VectorUtil: Enhance isEqual/compare w/ and w/o epsilon, add unit ↵Sven Gothel2014-03-154-182/+258
| | | | tests - Cleanup VectorUtil (vec2/3 naming, remove dedundant functions)
* Quaternion: User EPSILON for all tests against zero and one (identity .. ) ↵Sven Gothel2014-03-153-41/+138
| | | | and document the same. ; Minor edits ..
* Bug 801: Remove Vertex.Factory from AffineTransform ; Add AABBox tranformed ↵Sven Gothel2014-03-151-15/+57
| | | | resize.
* Bug 801: Outline/OutlineShape tranform and sort fixes ; Quaternion: Reduce ↵Sven Gothel2014-03-151-12/+25
| | | | | | | | | | | | | | | | | | | | muls in rotateVector Quaternion: - rotateVector(..): Reduce multiplication count by 17 Graph: - Outline - add: transform - fix compareTo .. use EPSILON - OutlineShape - add transform - fix compareTo .. use EPSILON - use Comparator<Outline> in sortOutlines to avoid reversal of list - Extract OutlineShapeXForm, pairing { OutlineShape, AffineTransform }
* Quaternion: Fix and enhance class incl. Extensive Unit Tests (all passed)Sven Gothel2014-03-141-232/+951
| | | | | | | | | | | - Add documentation incl references (Matrix-FAQ, Euclideanspace, ..) - Compared w/ other impl., i.e. WildMagic, Ardor3D, .. and added missing functionality incl unit tests. - PMVMatrix: Added convenient Quaternion 'hooks' - glRotate(Quaternion) - glLoadMatrix(Quaternion)
* Math and PMVMatrix: Cleanup and RefineSven Gothel2014-03-143-163/+460
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added final qualifier where possible - Refined API doc - FloatUtil: - Add machine EPSILON - fixed value and runtime computed (real machEps) - incl. isZero(..), isEqual(..) - Add makeRotationAxis(..) - Moved from PMVMatrix for reusage - Add makeRotationEuler(..) - New, not recommended due to Gimbal-Lock - Add copyMatrix[Column|Row](..) - Add more PI variations and trigo-func float mappings - Removed cross and normalize, use VectorUtil! VectorUtil: - Add copyVec* - Add equals and isZero w/ and w/o EPSILON - Add distance[Square] - Add length[Square] PMVMatrix: - Removed 'destroy' method in favor of making most fields 'final'. AffineTransform: - Added AABBox transform - Public multiply
* Bug 801: AffineTransform: Remove Serializable, make methods final; ↵Sven Gothel2014-03-062-12/+45
| | | | FloatUtil: Add DEBUG and description about Row-Major and Column-Major Order. AABBOX: Use FloatUtil.DEBUG for mapToWindow(..)
* Bug 801: Fix 183e1bc1868699b99eb9f9c8bf18d646d1120a48 'window box' CalculationSven Gothel2014-03-051-0/+48
| | | | | | | | | | | | Commit 183e1bc1868699b99eb9f9c8bf18d646d1120a48 only mapped object's bbox max/min points to window space, which is wrong due to possible rotation in 3d space. This commit adds AABBox.mapToWindow(..) method, which correctly either uses 4 points of the bbox in 3d space (using center-z) or all 8-points and creating a new bounding box. The resulting width and height of this window bbox gives the maximum amount of rectangular pixels for AA.
* Bug 801: VectorUtil: Pass result vector, allowing caller to manage memory ↵Sven Gothel2014-03-053-108/+96
| | | | (performance, reduce temp objects)
* Merge branch 'master' into stash_glyphcacheSven Gothel2014-02-232-27/+138
| | | | | | | | | | | | | | | | | | Conflicts: make/scripts/tests.sh src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java src/jogl/classes/com/jogamp/graph/curve/Region.java src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java src/jogl/classes/com/jogamp/graph/curve/opengl/TextRenderer.java src/jogl/classes/com/jogamp/graph/font/Font.java src/jogl/classes/com/jogamp/opengl/math/VectorUtil.java src/jogl/classes/jogamp/graph/curve/text/GlyphShape.java src/jogl/classes/jogamp/graph/curve/text/GlyphString.java src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java
* Bug 747: VectorUtil: Make scale(..) creating new float[] deprecated, adding ↵Sven Gothel2013-12-101-5/+33
| | | | | | | | | | 'in place' variant w/ passing result float[] ; TODO: Replace all variations with 'in place' version to be more memory efficient. Make scale(..) creating new float[] deprecated, adding 'in place' variant w/ passing result float[] TODO: Replace all variations with 'in place' version to be more memory efficient. See Bug747: Validate memory footprint and usage / General performance
* Add functions for converting to and from binary16 half-precision floating ↵Mark Raynsford2013-10-313-0/+801
| | | | point values. Derived from http://mvn.io7m.com/ieee754b16, of which I am the original author.
* jogl: allow short-circuited comparison in comparisonHarvey Harrison2013-10-181-1/+1
| | | | | | | For this case && and & work equivalently, but using && allows the second comparison to be omitted if the first comparison is false. Likely just a typo. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: add missing @Override annotationsHarvey Harrison2013-10-171-0/+3
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* jogl: remove all trailing whitespaceHarvey Harrison2013-10-177-177/+177
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* Remove deprecated methods.Sven Gothel2013-07-041-14/+2
| | | | | | | | | - Quaternion.isEmpty() - Texture.dispose(GL) - GLContext.getGLVersionMajor() / ..Minor() - GLContextImpl.bindPbufferToTexture() / releasePbufferFromTexture() - MouseEvent.getWheelRotation() -
* Quaternion: Fix float type - double epsilon slipped through review, where we ↵Sven Gothel2013-06-301-2/+2
| | | | like to compare float values - remove 64bit conversion.
* VectorUtil, Quaternion: Use 'final' qualifier if possibleSven Gothel2013-06-122-53/+53
|
* Merge remote-tracking branch 'remotes/hharrison/pr743'Sven Gothel2013-06-121-204/+239
|\
| * Quaternion.java : fixed not clear assignmentPetr Skramovsky2013-06-051-2/+3
| |
| * new method for vector multiplication, new copy constructorPetr Skramovsky2013-06-051-0/+28
| |
| * fixed isIdentity method, deprecated isEmpty method (quaternion doesn't have ↵Petr Skramovsky2013-06-051-13/+39
| | | | | | | | such a property + method do same thing as isIdentity), new setIdentity method, default constructor sets this quaternion to identity, new fromAxis method/costructor
| * removed unnecessary castings, removed unnecessary methods for vector ↵Petr Skramovsky2013-06-051-58/+11
| | | | | | | | operations changed to VectorUtil instead
| * reformatted to same stylePetr Skramovsky2013-06-051-180/+207
| |