Home arrow Objetos sem marcador

Login Form






Lost Password?

Random Image

 Apr   May 2013   Jun
SMTWTFS
   1  2  3  4
  5  6  7  8  91011
12131415161718
19202122232425
262728293031 
ASIC ESL

Syndicate

Who's Online

We have 1 guest online
Mostrar objetos sem marcador PDF Print E-mail

Para apresentar algum objeto virtual sem o uso de marcadores (Versão: ARToolKit2.65vrml), tome como base o código comentado a seguir:

 

------------------------------------------------------------------------

argDrawMode3D(); /* void argDrawMode3D (void)  - Switch the rendering context for 3D rendering mode. */

argDraw3dCamera( 0, 0 ); /* void argDraw3dCamera (int xwin, int ywin) - Switch the rendering view for 3D rendering mode.*/

 

/*Geometric Transformations in OpenGL

     Selecting the appropriate matrix

     Use glMatrixMode(GL_MODELVIEW) to select the Modelview matrix */

 

glMatrixMode(GL_MODELVIEW); /* void glMatrixMode(GLenum mode) - Specify which matrix is the current matrix; Applies subsequent matrix operations to the modelview matrix stack.*/

 

/*Modifying the contents of a matrix

 You can reset it to some matrix */

glLoadIdentity(); /* void glLoadIdentity(void) - replace the current matrix with the identity matrix */

 

/*The Modelview matrix

It can be modified by using glLoadIdentity(), glLoadMatrixf() or

glRotatef(angle, vx, vy, vz), (rotation about the axis specified by the vector (vx, vy, vz))

glTranslate(dx, dy, dz)

glScalef(sx, sy, sz)  */

 

glTranslatef(0, 50, 50);

glRotatef(90,1,0,0);

glScalef(1,1,1);

 

/*Rendering objects(VRML or OpenGL) */

arVrml97Draw(object[0].vrml_id);    /* List of VRML objects (data/vrml_data) */

/* OpenGL Objects  (e.g.,  glutWireCube(1.0)); */

----------------------------------------------------


 
< Prev   Next >