1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
| #include <SDL/SDL.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <cstdlib>
#include "Graphscene.h"
#include "Loader.h"
Loader::Loader(Graphscene *noeudparent, float addx, float addy, float addz, float addrotation, float addrx, float addry, float addrz, int max_vertex, int max_polygon) : Graphscene(noeudparent, addx, addy, addz, addrotation, addrx, addry, addrz)
{
this->max_vertex = max_vertex;
this->max_polygon = max_polygon;
}
void Loader::Test(int max_vertex, int max_polygon){
//test des structures
Modele test;
//coordonnées du sommet 0
test.vertex[0].x = 0.0;
test.vertex[0].y = 0.0;
test.vertex[0].z = 0.0;
//coordonnées du sommet 1
test.vertex[1].x = 0.0;
test.vertex[1].y = 0.0;
test.vertex[1].z = 0.0;
//coordonnées du sommet 2
test.vertex[2].x = 0.0;
test.vertex[2].y = 0.0;
test.vertex[2].z = 0.0;
//polygone 0 composé des sommets 0; 1; et 2
test.polygon[0].a = 0;
test.polygon[0].b = 1;
test.polygon[0].c = 2;
}
void Loader::Testa(){
} |
Partager