Hi all
Iam a novice in understanding the calculations for projecting a 3d
point to camera view.But i still i understood something and came out
with some calculations.
According to android documentation Iam getting the azimuth,pitch and
roll values from getOrientation method and using them for calculating
rotation matrix along x,y and z axis.
cos0x = (float)Math.cos((180-obj.pitch)*pi180);
sin0x = (float)Math.sin((180-obj.pitch)*pi180);
cos0y = (float)Math.cos((180-obj.azimuth)*pi180);
sin0y = (float)Math.sin((180-obj.azimuth)*pi180);
cos0z = (float)Math.cos((obj.roll)*pi180);
sin0z = (float)Math.sin((obj.roll)*pi180);
Usint this matrix x,y,z values in the camera coordinate system are
calculated.This is a simple matrix multiplication after translating
the x,y,z point to the camera coordiante system with camera as origin.
Hopefully Iam able to display the points over camera.
My problem is to hide the points which are behind camera.For this
somewhere i read that if the z value calculated above is -ve it sould
be displayed otherwise not.
But for me z value for all the points be it in front of camera or
behind carries the same sign.I dont know why.I hav spend my four dayzz
over it but not able to figure out where am i getting wrong.
I hope I have made myself clear.
Please let me know if my approach is not up to the mark or Iam missing
something?? :( :(
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en