Thank you Nightwolf.
I want to choose the Kube when I touch on the Kube face in order to
rotate Kube.
My idea is:
1. to get vertices of Kube to compose a polygon(2D);
2. judge if the touch point locates in the polygon;
As you said, the cube coordinates is not modified, so I use
gluunproject() to change touch point coordinates(x, y, 0) in order to
map window coordinates to object coordinates, and then I judged if the
new touch point coordinates locates in the polygon. Am I on the right
way?

On Jun 18, 11:59 am, Nightwolf <[email protected]> wrote:
> Cube coordinates are stored in vertices array in Cube.java.
> Rotating effect is achieved via model view matrix modification
> (glTranslate and glRotate commands). Original vertex data isn't
> modified.
>
> On Jun 17, 8:30 pm, quill <[email protected]> wrote:
>
>
>
> > Hi all,
> > I'm modifying Kube(api demo) to a game, does anyone who know how to
> > get the vertice coodinates of Kube? From the source code in api demo,
> > I think GLWorld.mVertexBuffer may save the vertice coodinates after
> > rotate the Kube, but I was wrong, the infomation in mVertexBuffer
> > always remains the same.- 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 [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
-~----------~----~----~----~------~----~------~--~---

Reply via email to