dev.gamez.lv Forum Index dev.gamez.lv
Latvian Game Developers Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 

aatrais jautaajums - 2d lookat

 
dev.gamez.lv Forum Index -> Matemātika un fizika
View previous topic :: View next topic  
Author Message
snake5
Indago dalībnieks
Indago dalībnieks


Joined: 27 Jun 2007
Posts: 2590

PostPosted: Sun Sep 16, 2007 5:17 pm    Post subject: aatrais jautaajums - 2d lookat

ja es zinu ekraana izmeerus (width/height), kaa tad lai es apreekinu "x" prieksh lookat funkcijas:
vec_to = {width/2,height/2,0}
vec_from = {width/2,height/2,x}
vec_up = {0,-1,0}
kaa?
_________________
"There are two choices here: "looks good" and "realism"." -- Paul Nettle
Back to top
View user's profile Visit poster's website
snake5
Indago dalībnieks
Indago dalībnieks


Joined: 27 Jun 2007
Posts: 2590

PostPosted: Sun Sep 16, 2007 8:00 pm    Post subject:

nu plzz paliidziet, nezinu, kaa googlee peec shitaa mekleet! nezinu, kaa tiek reekinaats fov/aspect ratio, u.t.t., tas man ljoti paliidzeetu!!!
_________________
"There are two choices here: "looks good" and "realism"." -- Paul Nettle
Back to top
View user's profile Visit poster's website
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Sun Sep 16, 2007 10:03 pm    Post subject:

Kāpēc tu gribi lietot kautkādu lookat 2d projekcijai?
Vai tad nepietiek vienkārši glTranslatef(width, height, 0); (ja ir uzstādīta ortogonāla projekcija) ?
Un Modelview matricai nekāds fov nav vajadzīgs.
Back to top
View user's profile Send e-mail
snake5
Indago dalībnieks
Indago dalībnieks


Joined: 27 Jun 2007
Posts: 2590

PostPosted: Mon Sep 17, 2007 11:30 am    Post subject:

1. es lietoju d3d, kaa vienmeer
2. man vajag panaakt, lai, ja es piemeeram ziimeetu 4stuuri (x1-0,x2-320,y1-240,y2-480), tad vinjsh arii paraadiitos preciizi kreisajaa apaksheejaa ekraana daljaa ar augsheejo labo stuuri uz centra!
nu kjipa lai pa taisno ziimeejaas screenspace koordinaatees (uz 640x480 tas buutu - augshaa pa kreisi - 0,0;lejaa pa labi - 640x480)!!!
_________________
"There are two choices here: "looks good" and "realism"." -- Paul Nettle
Back to top
View user's profile Visit poster's website
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Mon Sep 17, 2007 3:51 pm    Post subject:

snake5 wrote:
1. es lietoju d3d, kaa vienmeer

Tas nemaina lietas būtību. d3d un ogl strādā ar vienām un tām pašām matricām.

Maini vien to pašu modelview matricu ar parastu translācijas transformāciju ortogonālā projekcijā un viss notiksies.
Back to top
View user's profile Send e-mail
snake5
Indago dalībnieks
Indago dalībnieks


Joined: 27 Jun 2007
Posts: 2590

PostPosted: Mon Sep 17, 2007 4:57 pm    Post subject:

ok, meeginaashu!
_________________
"There are two choices here: "looks good" and "realism"." -- Paul Nettle
Back to top
View user's profile Visit poster's website
snake5
Indago dalībnieks
Indago dalībnieks


Joined: 27 Jun 2007
Posts: 2590

PostPosted: Mon Sep 17, 2007 5:13 pm    Post subject:

ew toc viss aizgaaja kaa naakas! paldies!
_________________
"There are two choices here: "looks good" and "realism"." -- Paul Nettle
Back to top
View user's profile Visit poster's website
Display posts from previous:   
dev.gamez.lv Forum Index -> Matemātika un fizika All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group