Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - confirm a specific texture on cube

confirm a specific texture on cube

Problems with Canvas, OpenGL, etc...

confirm a specific texture on cube

Postby gemch » Thu Dec 09, 2010 3:22 pm

hi, here is my problem, is there any possible to get which the user touch the cube? As we know cube has 6 different textures. And i trying to get the touch event x, y, but it return just the screen's x,y.
the solution i only thought is to calculate the x, y, and rotx, roty, but it's seems over work.........
thnks, i appreciate you answer me.
gemch
Freshman
Freshman
 
Posts: 3
Joined: Thu Dec 09, 2010 3:14 pm

Top

Re: confirm a specific texture on cube

Postby mark@project8games.com » Thu Dec 09, 2010 5:36 pm

Hmm, here's a simple algo off the top of my head
1)Define 6 planes, each corresponding to a face of the cube
2)Create a ray, parallel to the view plane normal, which originates at the touch point (translate to world space if necessary)
3)Preform a ray/plane intersection for the ray to each plane.

Seems like the most straightforward way to do it to me, but there might be simpler ways.
User avatar
mark@project8games.com
Developer
Developer
 
Posts: 41
Joined: Tue Mar 02, 2010 8:33 pm

Re: confirm a specific texture on cube

Postby gemch » Fri Dec 10, 2010 6:01 pm

mark@project8games.com wrote:Hmm, here's a simple algo off the top of my head
1)Define 6 planes, each corresponding to a face of the cube
2)Create a ray, parallel to the view plane normal, which originates at the touch point (translate to world space if necessary)
3)Preform a ray/plane intersection for the ray to each plane.

Seems like the most straightforward way to do it to me, but there might be simpler ways.

sounds like more difficult..., i'm a new guy in opengl of android, but any way, i'll try :)
thanks for replying.
gemch
Freshman
Freshman
 
Posts: 3
Joined: Thu Dec 09, 2010 3:14 pm

Top

Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 4 guests