asghar

Members
  • Content count

    34
  • Joined

  • Last visited

Community Reputation

100 Neutral

About asghar

  • Rank
    Member
  1. normalize

    hi (cot(θ/2)/aspect 0 0 0 ) ( 0 cot(a/2) 0 0 ) ( 0 0 (Near + Far)/(Near − Far) 2 Far Near/(Near − Far) ) * ( 0 0 −1 0 ) ( 1 0 0 px ) (cos(r) 0 sin(r) 0 ) (x1) (xt) ( 0 1 0 py ) ( 0 1 0 0 ) (y1) (yt) ( 0 0 1 pz ) * (-sin(r) 0 cos(r) 0 ) * (z1) = (zt) ( 0 0 0 1 ) ( 0 0 0 1 ) (1) (wt) how normalize (xt,yt,zt,wt)?
  2. Whether can use gluProject() for Obtained new Coordinate ((x1,y1,z1),(x2,y2,z2),(x3,y3,z3)) after code (A)? code(A)::( void display2(){ glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(a,aspect,n,f); glTranslatef(pz, py, pz); glRotatef(r,0.0,1.0,0.0); glPushMatrix(); glBegin(GL_TRIANGLES); glVertex3f(x1,y1,z1); glVertex3f(x2,y2,z2); glVertex3f(x3,y3,z3); glEnd(); glPopMatrix(); glutSwapBuffers(); })
  3. gluProject()

    Whether can use gluProject() for Obtained newCoordinate after code (A)? void display2(){ glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(a,aspect,n,f); glTranslatef(pz, py, pz); glRotatef(r,0.0,1.0,0.0); glPushMatrix(); glBegin(GL_TRIANGLES); glVertex3f(x1,y1,z1); glVertex3f(x2,y2,z2); glVertex3f(x3,y3,z3); glEnd(); glPopMatrix(); glutSwapBuffers(); }
  4. coordinate

    I need new Coordinate after code (A). void display2(){ glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(a,aspect,n,f); glTranslatef(pz, py, pz); glRotatef(r,0.0,1.0,0.0); glPushMatrix(); glBegin(GL_TRIANGLES); glVertex3f(x1,y1,z1); glVertex3f(x2,y2,z2); glVertex3f(x3,y3,z3); glEnd(); glPopMatrix(); glutSwapBuffers(); } how obtain?
  5. Homogeneous

    Hi I'm trying use code (b) in stead of code (a) , Code(a){{ void display2(){ glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(a,aspect,n,f); glTranslatef(pz, py, pz); glRotatef(r,0.0,1.0,0.0); glPushMatrix(); glBegin(GL_TRIANGLES); glVertex3f(x1,y1,z1); glVertex3f(x2,y2,z2); glVertex3f(x3,y3,z3); glEnd(); glPopMatrix(); glutSwapBuffers(); } }} Code(b) {{ (cot(θ/2)/aspect 0 0 0 ) ( 0 cot(a/2) 0 0 ) ( 0 0 (Near + Far)/(Near − Far) 2 Far Near/(Near − Far) ) * ( 0 0 −1 0 ) ( 1 0 0 px ) (cos(r) 0 sin(r) 0 ) (x1) (xt) ( 0 1 0 py ) ( 0 1 0 0 ) (y1) (yt) ( 0 0 1 pz ) * (-sin(r) 0 cos(r) 0 ) * (z1) = (zt) ( 0 0 0 1 ) ( 0 0 0 1 ) (1) (1) x1=xt; y1=yt;z1=zt; x1=xt/w,y1yt/w,z1=zt/w; Repeat this method for (x2,y2,z2) and (x3,y3,z3). void display2(){ glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glPushMatrix(); glBegin(GL_TRIANGLES); glVertex3f(x1,y1,z1); glVertex3f(x2,y2,z2); glVertex3f(x3,y3,z3); glEnd(); glPopMatrix();glutSwapBuffers();} }} But when triangle collide to plan Near, code(b) return incorrect result.
  6. glGetFloat

    hi how use void glGetDoublev( GLenum pname, GLdouble *params ) to obtain the clipping coordinate W value?
  7. Homogeneous

    Hi I'm trying use code (b) in stead of code (a) , Code(a){{ void display2(){ glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(a,aspect,n,f); glTranslatef(pz, py, pz); glRotatef(r,0.0,1.0,0.0); glPushMatrix(); glBegin(GL_TRIANGLES); glVertex3f(x1,y1,z1); glVertex3f(x2,y2,z2); glVertex3f(x3,y3,z3); glEnd(); glPopMatrix(); glutSwapBuffers(); } }} Code(b) {{ (cot(θ/2)/aspect 0 0 0 ) ( 0 cot(a/2) 0 0 ) ( 0 0 (Near + Far)/(Near − Far) 2 Far Near/(Near − Far) ) * ( 0 0 −1 0 ) ( 1 0 0 px ) (cos(r) 0 sin(r) 0 ) (x1) (xt) ( 0 1 0 py ) ( 0 1 0 0 ) (y1) (yt) ( 0 0 1 pz ) * (-sin(r) 0 cos(r) 0 ) * (z1) = (zt) ( 0 0 0 1 ) ( 0 0 0 1 ) (1) (1) x1=xt; y1=yt;z1=zt; x1=xt/w,y1=yt/w,z1=zt/w; Repeat this method for (x2,y2,z2) and (x3,y3,z3). void display2(){ glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glPushMatrix(); glBegin(GL_TRIANGLES); glVertex3f(x1,y1,z1); glVertex3f(x2,y2,z2); glVertex3f(x3,y3,z3); glEnd(); glPopMatrix();glutSwapBuffers();} }} But when triangle collide to plan Near, code(b) return incorrect result.
  8. clipping coordinate

    hi all how obtain the clipping coordinate W value?.
  9. homogeneous

    hi. how convert a homogeneous representation to a non-homogeneous ?
  10. homogeneous

    hi how convert a homogeneous representation to a non-homogeneous?
  11. hi how obtain the clipping coordinate W value?.
  12. using namespace System::Media; this code give erro in console(c++). how use sounplayer?
  13. soundplayer class

    hi how use soundplayer class in console?(c ++)
  14. openal

    hi how unse openal in Visual Studio 2005?
  15. openal

    hi how unse openal in Visual Studio 2005?