- Get your objects coordinates in the model view (you should have
those :))
- Get the current model view matrix (see MatrixTrackingGL class in
your APIDemo's source code for OpenGL)
- Take a look the gluUnProject/gluProject methods and use them to
figure out what part of the LCD-screen your 3D objects are occupying.

On Apr 3, 10:24 am, William <william.caine...@gmail.com> wrote:
> //i rotate the cube using the following
> //xRot,yRot are inc or decremented to change angles
> gl.glRotatef(xRot, 1.0f, 0.0f, 0.0f);
> gl.glRotatef(yRot, 0.0f, 1.0f, 0.0f);
>
> So yes i have access to yRot and xRot but they numbers range from -900
> to +900.  I figure I can used them somehow to tell what is rotated but
> I am unsure how.  i just pass them in and it magically rotates for
> me.  so i am unsure how to tell from the numbers what angle the cube
> is at.
>
> can I take a trig function to them or what?  or do i take the xRot %
> 360 and the remainder is what degree I am at.  Or is xRot in radians
> so I must convert it.
>
> On Apr 3, 12:41 am, Marco Nelissen <marc...@android.com> wrote:
>
>
>
> > Since you're rotating and drawing the cube, shouldn't you have that
> > information in your app already?
>
> > On Thu, Apr 2, 2009 at 7:30 PM, William <william.caine...@gmail.com> wrote:
>
> > > Hi Folks,
>
> > > I am drawing and rotating a cube.  Is there a programmatic way to tell
> > > what side of the cube is facing me?
>
> > > For example if I randomly spin the cube when done spinning. I want to
> > > know which face(s) I am looking at.  10% of face 1, 90% of face 2.- Hide 
> > > quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to