gKit2 light
Loading...
Searching...
No Matches
tuto_pad.cpp File Reference

exemple d'utilisation des pads. More...

#include "mat.h"
#include "wavefront.h"
#include "texture.h"
#include "orbiter.h"
#include "draw.h"
#include "app.h"
#include "app_camera.h"
#include "gamepads.h"

Go to the source code of this file.

Classes

class  Pad

Functions

Mesh make_grid ()
int main (int argc, char **argv)

Detailed Description

exemple d'utilisation des pads.

Definition in file tuto_pad.cpp.

Function Documentation

◆ make_grid()

Mesh make_grid ( )

Definition at line 18 of file tuto_pad.cpp.

19{
20 Mesh grid= Mesh(GL_LINES);
21
22 for(int x= 0; x < 10; x++)
23 {
24 float px= (float) x - 5.f + 0.5f;
25 grid.vertex(Point(px, 0, -4.5f));
26 grid.vertex(Point(px, 0, 4.5f));
27 }
28
29 for(int z= 0; z < 10; z++)
30 {
31 float pz= (float) z - 5.f + 0.5f;
32 grid.vertex(Point(-4.5f, 0, pz));
33 grid.vertex(Point(4.5f, 0, pz));
34 }
35
36 return grid;
37}
representation d'un objet / maillage.
Definition mesh.h:121
unsigned int vertex(const vec3 &p)
insere un sommet de position p, et ses attributs (s'ils sont definis par color(), texcoord(),...
Definition mesh.cpp:97
representation d'un point 3d.
Definition vec.h:21

◆ main()

int main ( int argc,
char ** argv )

Definition at line 131 of file tuto_pad.cpp.

132{
133 Pad app;
134 app.run();
135
136 return 0;
137}
int run()
execution de l'application.
Definition app.cpp:36