I have no idea how it differs from the original version (as shipped in
the SDK). :-)
The original version just didn't work and i ported a C-version (google
it) into Java. And this seems to work for my app and other developers'
apps.
On Feb 5, 11:22 pm, Tim Newsham tim.news...@gmail.com wrote:
I opened a bug report on this:
http://code.google.com/p/android/issues/detail?id=6502
Could you run my test case (http://www.thenewsh.com/~newsham/unproj/
unproj-tracer.java)
with the original unproject function (already there) and with your
unproject
function and compare the results?
I also
FWIW, the following unproject code seems to line up properly for me.
Notice that I had to map view coordinates to (-1.25,1.25) instead of
from (-2,2). I got these numbers empirically and have no idea why
this would be so or how close to the correct values I am.
static void fixW(float[] v) {
oops, I meant to (-0.625,0.625) rather than (-1,1)
On Feb 6, 10:22 am, Tim Newsham tim.news...@gmail.com wrote:
FWIW, the following unproject code seems to line up properly for me.
Notice that I had to map view coordinates to (-1.25,1.25) instead of
from (-2,2). I got these numbers
I found issues with the gluUnProject as well.
I wrote a new one for my own app (The Gube) and it works very well. I
use gluUnproject for tracking 2D finger-touches and flings into the 3D
model-view/space.
You can do a gluUnproject search on this forum and you will find this:
Could you explain how your version might differ from the original
version?
The version in the standard library:
computes M = (Projection x Model)^-1
puts world into a homogenous vector V,
with x/y coordinates mapped from screen coords to -1.0 to 1.0
and z coordinate mapped from
6 matches
Mail list logo