diff options
author | Sven Gothel <[email protected]> | 2014-03-14 07:50:20 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-03-14 07:50:20 +0100 |
commit | b3fb80b4e03818f1f7dfdddd1ffcb01e6a0a8acc (patch) | |
tree | 4c1de742b4e9d4a7a2f1981ba6a2fd358622099d /src/jogl/classes/jogamp/opengl/ProjectFloat.java | |
parent | 3a3bbd87955321d790ba0f63402c573047304b1a (diff) |
Math and PMVMatrix: Cleanup and Refine
- 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
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/ProjectFloat.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/ProjectFloat.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/jogl/classes/jogamp/opengl/ProjectFloat.java b/src/jogl/classes/jogamp/opengl/ProjectFloat.java index d4fd1c935..80c142429 100644 --- a/src/jogl/classes/jogamp/opengl/ProjectFloat.java +++ b/src/jogl/classes/jogamp/opengl/ProjectFloat.java @@ -123,6 +123,7 @@ import javax.media.opengl.fixedfunc.GLMatrixFunc; import com.jogamp.common.nio.Buffers; import com.jogamp.opengl.math.FloatUtil; +import com.jogamp.opengl.math.VectorUtil; /** * ProjectFloat.java @@ -407,14 +408,14 @@ public class ProjectFloat { up[1] = upy; up[2] = upz; - FloatUtil.normalize(forward); + VectorUtil.normalize(forward); /* Side = forward x up */ - FloatUtil.cross(forward, up, side); - FloatUtil.normalize(side); + VectorUtil.cross(side, forward, up); + VectorUtil.normalize(side); /* Recompute up as: up = side x forward */ - FloatUtil.cross(side, forward, up); + VectorUtil.cross(up, side, forward); FloatUtil.makeIdentityf(matrixBuf); final int mPos = matrixBuf.position(); |