Example #1
0
int main(int argc,char** argv){
	char c;
	bool complet=true;
	char* tvalue=NULL;
	int taille=15;
	bool BoolAffiche=true;
	bool resultat=true;
	while((c=getopt(argc,argv,"oncpsrt:"))!=-1){
		switch(c)
		{
		case 'c':
			break;
		case 'r':
			resultat=false;
			break;
		case 'p':
			complet=false;
			break;
		case 't':
			tvalue=optarg;
			break;
		case 's':
			BoolAffiche=false;
			break;
		case '?':
			printf("usage: -s desactiver l'affichage  -c:graphe complet -p:graphe partielle -t:taille a specifier\n");
		 default:
			abort();
		}
	}
	
	if(tvalue!=NULL)
		taille=atoi(tvalue);

	srand(time(NULL));
	Matrix m;

	if(complet==true)	
		m=grapheComplet(taille);
	else
		m=graphePartiel(taille);
	
	if(BoolAffiche==true){
		affichage(m);
		printf("\n");
	}

	Matrix ARPM=kruskal(m,resultat);
	
	if(BoolAffiche==true){
		printf("\n");
		affichage(ARPM);	
		printf("\n");
	}

	deleteMatrix(m);
	deleteMatrix(ARPM);
return 0;	

}
Example #2
0
void Puissance4::newPartie (){
  Plateau *p = Partie::getPartie()->getPlateau();
  Joueur *j = Partie::getPartie()->getJoueurs();
  int choix_pos = 0;
    int i=0;
  j->next();
  do{
    j->next();
    cout << "Joueur "<< j->getCourrant()<< endl;
    affichage();
    do{
      i = 0;
      cout << "choisissez une position : " << endl;
      cin >> choix_pos;
      for(;i < nbLignes && not p->hasPion(i, choix_pos); i++){}
    }while(choix_pos < 0 || 
	   choix_pos > nbLignes || 
	   (i == 0 && p->hasPion(choix_pos, i)));
    i = (i==0)? 0 : i-1;
    if(j->getCourrant() == 0){
      p->mettrePionDansCase(pO, i, choix_pos);
    } else {
      p->mettrePionDansCase(pX, i, choix_pos);
    }
  }while(not hasP4(i, choix_pos));
  affichage();
  cout << "Le joueur " << j->getCourrant() << "a gagné "<<  endl; 
  
}
Example #3
0
// fonction de gestion du clavier spécial
void clavierSpecial(int touche, int x, int y)
{
    switch(touche)
    {
    case GLUT_KEY_RIGHT :
        // effectuer une rotation vers la droite autour du cube
        Variable::theta += DEG2RAD(2.0f);
        affichage();
        break;

    case GLUT_KEY_LEFT :
        // effectuer une rotation vers la droite autour du cube
        Variable::theta -= DEG2RAD(2.0f);
        affichage();
        break;

    case GLUT_KEY_UP :
        // effectuer une rotation vers la droite autour du cube
        Variable::phi -= DEG2RAD(2.0f);
        affichage();
        break;

    case GLUT_KEY_DOWN :
        // effectuer une rotation vers la droite autour du cube
        Variable::phi += DEG2RAD(2.0f);
        affichage();
        break;
    }
}
Example #4
0
		// fonction de gestion du clavier
		void clavier(unsigned char touche, int x, int y)
		{
			// traitement des touches q et echap
			switch(touche) 
			{
			case 'q' :
				// destruction de la fenetre GLUT
				glutDestroyWindow(g_nWindowID);
				// on quitte notre programme
				exit(EXIT_SUCCESS);
				break;

				// permutation de la perspective
			case 'p' :
				if (isPerspective)
					isPerspective = false;
				else
					isPerspective = true;
				affichage();
				break;

				// permutation de l'activation des shaders
			case 'x' :
				if (SHADER_ON)
					SHADER_ON = false;
				else
					SHADER_ON = true;
				glutPostRedisplay();
				break;

				// ajustement du zoom
			case '-' :
				// la caméra recule
				rho += 2.0f;
				affichage();
				break;

				// ajustement du zoom
			case '=' :
				// la caméra avance
				rho -= 2.0f;
				if (rho <= 1.0)
					rho = 1.0f;
				affichage();
				break;
				// activation/desactivation du VBO
			case 'v' :
				useOldGL = !useOldGL;
				if(useOldGL)
					printf("desactivation VBO\n");
				else
					printf("activation VBO\n");
				break;
			case 'f':
					activerIPS = !activerIPS;
					break;
			}
		}
Example #5
0
int main()
{
   Mras2an_struct * myStruct = NULL;
   
   /*Add new element*/
   myStruct = ajouterFin(myStruct, 11);
   myStruct = ajouterDebut(myStruct, 10);
   myStruct = ajouterDebut(myStruct, 9);
   myStruct = ajouterDebut(myStruct, 8);
   
   /*print nb elements*/
   printf("nbElement: %d\n",nbElement(myStruct));
   printf("nbElementRec: %d\n",nbElementRec(myStruct));

   /*print elements*/
   affichage(myStruct);

   /*search nb 10*/
   if (recherche(myStruct, 10))
   {
      printf("Nb found\n");   
   }
   else
   {
      printf("Nb not found\n");   
   }

   /*search nb 20*/
   if (recherche(myStruct, 20))
   {
      printf("Nb found\n");   
   }
   else
   {
      printf("Nb not found\n");   
   }

   /*removing the first and last element*/
   myStruct = suppDebut(myStruct);
   myStruct = suppFin(myStruct);
   
   /*print*/
   printf("nbElement: %d\n",nbElement(myStruct));
   printf("nbElementRec: %d\n",nbElementRec(myStruct));
   affichage(myStruct);

   /*removing the nb 9*/
   myStruct = element(myStruct, 9);
   printf("nbElement: %d\n",nbElement(myStruct));
   affichage(myStruct);

   return 0;
}
Example #6
0
int main(int argc, char **argv)
{
   int t1[50],t2[50],t3[100];

   int m,n,i,j,k;
   
   printf("Donner la taille du tableau t1\n");
   saisie_taille(&m,50);
   printf("Donner la taille du tableau t2\n");
   saisie_taille(&n,50);
   
   
   printf("Remplissage du tableau t1\n");
   remplissage_croissant(m,&t1[0]); 
   printf("Remplissage du tableau t2\n");
   remplissage_croissant(n,&t2[0]);    
   for(k=0,i=0,j=0;k<m+n;k++)
    { 
      if(j<n && i<m)
      {
       if(t1[i]<t2[j])
         t3[k]=t1[i++];
       else if(t1[i]>t2[j])
         t3[k]=t2[j++];
       else
        { 
          t3[k]=t1[i++];
          t3[++k]=t2[j++];
        }
      }else
       {
         if(j==n && i < m)
            t3[k]=t1[i++];
         else
             t3[k]=t2[j++];
       }
      
    }
    
    printf("Affichage de t1\n");
    affichage(t1,m);
    printf("Affichage de t2\n");
    affichage(t2,n);
    printf("Affichage t3\n");
    affichage(t3,m+n);
    
    return 0;
}
Example #7
0
void testAffichage()
{
    FILE* fichier = fopen("record_test_affichage.dat", "r");

    if( fichier == NULL)
    {
        printf("Impossible d'ouvrir le fichier record_test_affichage.dat car il n'existe pas\n");
    }
    else
    {
        int *valSortie=calloc(2,sizeof(int));
        int n=0;

        while(fscanf(fichier, "%d,%d", &valSortie[0], &valSortie[1]) != EOF)
        {
            Sleep(100);
            printf("Valeurs lues= %d,%d\t",valSortie[0],valSortie[1]);

            affichage(valSortie);
            n++;
        }
    }
    printf("Appuyer sur une touche pour revenir au menu\n");
    getch();

    fclose(fichier);
    system("cls");

    topMenu(menu());
}
Example #8
0
u64 *problem_solve(problem_t *p) {
	bool_t result;
    tree_t root = NULL;
    size_t i = 0;
    u64 *solution = NULL;

    if (p == NULL)
        return NULL;

    root = tree_init();
	for (; i < p->n_vars; i++) {
		result = problem_alloc(p, root, p->vars[i]);
	}


	if (root->n_children == 0) {
		printf("pas de solution");
	}
	else {
			affichage(root);
	}


	return solution;
}
Example #9
0
void SceneSDL::bouclePrincipale()
{
    bool continuer = true;
    time_t t1, t2;
    double dt;

    t1 = clock();
    while (continuer)
    {
        SDL_PollEvent(&m_event);
        gererEvent(continuer);

        // Calul du dt
        t2 = clock();
        dt = (double)(t2 - t1)/CLOCKS_PER_SEC;
        t1 = t2;
        if (dt > def::dtMax)
            dt = def::dtMax;

        // Mouvement

        // Actualisation du rendu
        affichage(continuer);
    }
}
Example #10
0
int main()
{

	struct personne *personne[NB];
	int tab[NB];
	int i;


	for(i=0;i<NB;i++)
	{
		personne[i]=(struct personne *)malloc(sizeof(struct personne));	
		init(personne[i],i);
	}


	suppression_redondance(personne,tab);
			

	for(i=0;i<NB;i++)
	affichage(personne[i],i);

	for(i=0;i<NB;i++)
	{
		free(personne[i]->pere);
		free(personne[i]->mere);
		if(tab[i]!=1)
			free(personne[i]->adresse);
		free(personne[i]);
	}
	
}
Example #11
0
		// fonction de redimensionnement de la fenêtre graphique
		void redimensionnement(GLsizei w, GLsizei h)
		{
			currentW = w;
			currentH = h;
			glViewport(0, 0, w, h);
			affichage();
		}
Example #12
0
/**
Représente un tour de boucle, ici ce trouve
toutes la gestion du jeu
@return true si pas de collision
*/
bool Game::gameLoop(sf::Clock & clock)
{
	affichage();

	sf::Event event;
	recuperationEntree(event);

	//valeur qui sera retrournée a la fin de la GameLoop
	bool etat = m_map.collisionBloc(m_vaisseauJoueur, m_tirs, m_distanceParcouru);

	actualisationInfoJoueur();

	//actualisation du temps
	m_tempsPasse = clock.getElapsedTime().asMicroseconds() / 20000.;
	clock.restart().asMicroseconds();
	m_tempsPasse /= m_coefRalentissement;

	//calcul de la trajectoire puis la vitesse sera calculé a part
	traitement(event, m_tempsPasse);

	gestionScrolling(m_tempsPasse);

	//deplacement des tirs
	gererTirs(m_tempsPasse);

	rechargeDesVaisseaux(m_tempsPasse);

	actualiserAnimation(m_tempsPasse);

	//comp 1
	float tempsMaxComp = m_vaisseauJoueur.getCompetence(2)->getTempsDeRechargeMax();
	float tempsActuelComp = m_vaisseauJoueur.getCompetence(2)->getTempsDeRechargeActuel();
	float rapportComp1 = 1;

	if (tempsActuelComp != tempsMaxComp)
		rapportComp1 = ((tempsMaxComp - tempsActuelComp) / tempsMaxComp);

	//comp 2
	tempsMaxComp = m_vaisseauJoueur.getCompetence(3)->getTempsDeRechargeMax();
	tempsActuelComp = m_vaisseauJoueur.getCompetence(3)->getTempsDeRechargeActuel();
	float rapportComp2 = tempsActuelComp / tempsMaxComp;

	//comp 3
	tempsMaxComp = m_vaisseauJoueur.getCompetence(1)->getTempsDeRechargeMax();
	tempsActuelComp = m_vaisseauJoueur.getCompetence(1)->getTempsDeRechargeActuel();
	float rapportComp3 = 1;
	if (m_vaisseauJoueur.getCompetence(1)->estActive())
	{
		rapportComp3 = tempsActuelComp / tempsMaxComp;
	}
	else if (tempsActuelComp != tempsMaxComp)
	{
		rapportComp3 = (tempsMaxComp - tempsActuelComp) / tempsMaxComp;
	}

	tableauDeBord.actualiserAnimationAvecCompetence(rapportComp1, rapportComp2, rapportComp3, m_vaisseauJoueur.getCompetence(1)->estActive());

	return etat;
}
Example #13
0
void affichage(Mras2an_struct* l)
{
   if (!estVide(l))
   {
      printf("%d\n",l->compt);
      return(affichage(l->suivant));
   }
}
Example #14
0
int main()
{
	int nombre;
	printf("Choisissez le nombre d'etoile(s) a afficher : ");
	scanf("%d", &nombre);
	affichage(nombre);
	return 0;
}
Example #15
0
/*
 * main
 */
int main(int argc, char** argv) {


    espace=init();
    SDL_Event event;
    int continuer=1;
    SDL_Init(SDL_INIT_VIDEO);
    ecran=SDL_SetVideoMode(640, 480, 32, SDL_HWSURFACE | SDL_DOUBLEBUF);


    
    //char* fichier_dico = "dico.txt";
    //algo_1(fichier_dico, "asdfarbre");
    if (ecran == NULL)
    {
        fprintf(stderr, "Erreur d'initialisation de la SDL");
        exit(EXIT_FAILURE);
    }
     
    SDL_WM_SetCaption("Letter Boule Game !", NULL);
    SDL_FillRect(ecran, NULL, SDL_MapRGB(ecran->format,0,0,0));
    initPolice();
    initLesBoules(espace);
    boolean refresh=TRUE;
    while (continuer) {
        SDL_WaitEvent(&event);
        switch(event.type) {
            case SDL_QUIT: continuer = 0;
        }
        
        if(refresh)
        {
            affichage();
            refresh=FALSE;
        }    
        if(nbBoules==0)
    {
        SDL_Color white={255,255,255};
        SDL_Surface *game=TTF_RenderText_Solid(police,"GAME OVER" , white);
        SDL_Rect position_game;
        position_game.y=320;
        position_game.x=240;
        SDL_BlitSurface(game, NULL, ecran, &position_game);  
    }
        SDL_Flip(ecran);
        refresh=tracerLigne();
        
        SDL_Flip(ecran);
    }   
    
    cpSpaceFree(espace);
    TTF_CloseFont(police);
    TTF_Quit();
    SDL_Quit();
  
    return (EXIT_SUCCESS);
}
Example #16
0
void commencerJeu(champs C) {
    char* choix = malloc(1);
    int triche = 0;
    while (C->nb_erreurs_restant >= 0 && !fin_jeu(C)) {
        int x, y;
        if (triche == 0)
            affichage(C);
        else {
            affichage_triche(C);
            triche = 0;
        }

        move(1 + C->nb_lignes + 10, 33);
        scanw("%s", choix);

        if (choix[0] == 'q' || choix[0] == 'Q')
            break;
        if (choix[0] == 's' || choix[0] == 'S') {
            char reponse;
            char *nom_fichier = malloc(0);
            int enregistre = 0;
            while (1) {
                printw("donner le nom sous lequel vous voulez enregistrer la partie");
                scanw("%s", nom_fichier);
                if (fopen(nom_fichier, "r") == NULL) {
                    sauvegarder(nom_fichier, C);
                    enregistre = 1;
                    break;
                } else {
                    printw("Le fichier existe déja. Voulez vous l'écraser o/n?");
                    scanw("%c", &reponse);
                    if (reponse == 'o' || reponse == 'O') {
                        sauvegarder(nom_fichier, C);
                        enregistre = 1;
                        break;
                    } else {
                        printw("Voulez vous choisir un autre nom o/n?");
                        scanw("%c", &reponse);
                        if (!(reponse == 'o' || reponse == 'O')) {
                            break;
                        }
                    }
                }
            }
            if (enregistre == 1) break;
        }

        if (choix[0] == 'a' || choix[0] == 'A')
            triche = 1;
        else {
            recupXY(choix, &x, &y);
            if (joueur(C, x, y) == 1)
                C->nb_erreurs_restant--;
        }
    }
}
Example #17
0
int main (int argc , char * argv[])
{
   
   login_t tab[TAILLE];
   saisie(tab);
   system("clear");
   affichage(tab);
   

   return(EXIT_SUCCESS);
}
Example #18
0
File: main.c Project: Gr05/CPS
int main (int argc, char * argv[])
{
    int i,j, taille, nb_coup;
    grille g, gc;
    carac_navires tab_def_jeu[4];
    FILE * fichierIn;

    if (argc != 3)
    {
        printf("main.c : Il n'y a pas le bon nombre d'arguments\n");
        exit(1);
    }
    else
    {
        taille = atoi(argv[1]);
        fichierIn = open_file(argv[2]);
    }

    liste_navires * l;
    nb_coup = 0;

    g = creer_grille(taille);
    init_grille(g, taille);
    init_carac_navires (tab_def_jeu);

    gc = creer_grille(taille);
    init_grille(gc, taille);

    remplit_grille(g, taille, fichierIn, tab_def_jeu);

    l = creer_liste_navires(g, taille);

    while(!jeu_fini(l)) {
        printf("Quel point ?\n");
        if (scanf("%d", &i)!= 1) {
            printf("Entrer un couple d'entier svp !\n");
            getchar();
        }
        printf("la première coordonées est entrée, entrez la deuxième : \n");
        if (scanf("%d", &j)!= 1) {
            printf("Entrer un couple d'entier svp !\n");
            getchar();
        }
        printf("Les deux coordonées on bien été récupérées !\n");
        joue(g, gc, taille, l, i, j);
        nb_coup++;
        affichage(gc, taille);
    }

    printf("Félicitation le jeu est terminé !!\nIl vous a fallut %d coup pour coulé tout les bateaux\n", nb_coup);

    return 0;
}
Example #19
0
int main() {
    int n = 3;
    double M[] = {25, 15, -5,
                   15, 18,  0,
                   -5,  0, 11};
    double *C = cholesky(M, n);
    affichage(C, n);
    printf("\n");
    free(C);
 
    n = 4;
    double N[] = {18, 22,  54,  42,
                   22, 70,  86,  62,
                   54, 86, 174, 134,
                   42, 62, 134, 106};
    double *D = cholesky(N, n);
    affichage(D, n);
    free(D);
 
    return 0;
}
Example #20
0
int main()
{
    printf("--------------------------------------------------------\n");
    printf("\tWelcome to the Xp ToS Simulator \n");
    printf("--------------------------------------------------------\n\n");

    affichage();

    printf("--------------------------------------------------------\n");
    printf("\tThank You for Using Xp Tos Simulator\n");
    printf("--------------------------------------------------------");
    return 0;
}
Example #21
0
void main(void) {
	// unsigned char address = 0;
	// char msg1[80] = "Slave Ready \n \r";

	initPorts(); // Initialize ports to startup state
	initComms(); // Initialize the serial port


	while (1) {
            decodage(0);
            affichage();
	}

}
Example #22
0
int main(int argc, char * argv[])
{
  cellule_t * tete = NULL;
  cellule_t * queue = NULL;
  char car = 'O';
  while(toupper(car)=='O')
  {
     adj_lch_fin(&tete,&queue);
     printf("saisir une autre chaine?\n");
     scanf("%c",&car);
     getc(stdin);
  }
  affichage(tete);
  return(EXIT_SUCCESS);
}
Example #23
0
//--Programme principal--
int main() {
  int jnaiss = 0, mnaiss = 0, anaiss = 0, jpred = 0, mpred = 0, apred = 0;
  int degreplus_global = 0, degreplus_amour = 0, degreplus_travail = 0,
      degreplus_argent = 0;
  srand(time(NULL));

  acquisition(&jnaiss, &mnaiss, &anaiss, &jpred, &mpred, &apred);
  degreplus_global = (calcul_predictions(
      jnaiss, mnaiss, anaiss, jpred, mpred, apred, &degreplus_amour,
      &degreplus_travail, &degreplus_argent));
  affichage(degreplus_global, degreplus_amour, degreplus_travail,
            degreplus_argent);
  printf("\n\nMerci d'avoir utilise EXIAVENIR !!!\n\n    Que les astres vous "
         "protegent !!!\n\n      Et revenez si vous avez un autre doute sur "
         "votre avenir !!\n\n");

  return 0;
}
/*
*  NAME        : comparaison
*  DESCRIPTION : permet de verifier les valeurs propres obtenus avec notre implementation à ceux de lapacke
*  IN          : nombre de ligne, nombre de colonne, matrice
*  OUT         : /
*  DEBUG       : /
*/
void comparaison(int ligne, int colonne, double *a)
{
	double *eigenvalues = malloc(ligne * sizeof(double));
	double tmp;

	fprintf(stdout, "\nValeurs propres issues de LAPACk\n");
	LAPACKE_dsyev(LAPACK_ROW_MAJOR, 'V', 'L', ligne, a, ligne, eigenvalues);

	for(int i = 0; i < ligne / 2; i++)
	{
		tmp = eigenvalues[i];
		eigenvalues[i] = eigenvalues[ligne - i - 1];
		eigenvalues[ligne - i - 1] = tmp;
	}

	affichage(ligne, 1, eigenvalues);
	free(eigenvalues);
}
Example #25
0
int jouerNiv(int niv)
{
    t_listePerso* liste;
    liste=creer_liste_perso();
    float mapx=0;
    float v_scroll=2;
    int test_appui=0;
    int compt=0;
    int fini=-1;

    ajouterPerso(liste,50,SCREEN_H/2);

    while (!key[KEY_ESC])
    {
        compt++;
        if (key[KEY_ENTER] && test_appui==0)
        {
            ajouterPerso(liste,0,SCREEN_H/2);
            test_appui=1;
        }
        if (!key[KEY_ENTER] && test_appui==1)
        {
            test_appui =0;
        }
        fini=victoire(&mapx,&v_scroll,liste);
        if (fini!=-1)
        {
            return fini;
        }
        score(liste);
        scroll(&mapx,&v_scroll);
        fini=actualiserListePerso(liste,&compt,v_scroll);
        if (fini!=-1)
        {
            return fini;
        }
        tuer_Perso(liste);
        affichage(&mapx,liste);
        actualiser_bitmap_collision(&mapx,liste);
        rest(8);

    }
    return fini;
}
Example #26
0
main()
{
  int choix;

  choix = 1;
  dans_inventaire = 0;

  while(choix != 0)
  {
    printf("-1- Saisie d'une liste d'articles\n");
    printf("-2- Affichage de tous les articles\n");
    printf("-3- Affichage de tous les articles dont le prix est inferieur a\n");
    printf("-4- Modifier le prix d'un article\n");
    printf("-5- Afficher les articles par prix décroissant\n");
    printf("-0- Quitter\n");
    printf("Choix : ")  ;
    scanf("%d", &choix) ;
    switch(choix)
    {
      case 1 :
        saisie();
        break;
      case 2 :
        affichage();
        break;
      case 3 :
        affichage_sel();
        break;
      case 4 :
        modif_prix();
        break;
      case 5 :
        affichage_tri();
        break;
      case 0 :
        printf("au revoir\n") ;
        break;
      default:
        printf("Le choix effectué n'est pas valide. Veuillez ressaisir.\n") ;
        break;

    }
  }
}
Example #27
0
int main()
{
    //Initialisation des variables
    int mode, maxi;
    char terrain [20][38];
    char pseudo[100][4];  //Les deux tableaux suivants servent à l'affichage des meilleurs scores
    int score[100];

    coordonees PacMan;
    coordonees fantomeA;
    coordonees fantomeB;
    coordonees fantomeC;
    coordonees fantomeD;

    SetWindow(70,26); //On redimentionne la fenêtre (c'est le seul réglage faisable automatiquement)

    srand(time(NULL)); //On initialise les nombres aléatoires

    do
    {
        menu(&mode);
        switch(mode)
        {
        case 1 :
            initialisation(terrain, &PacMan, &fantomeA, &fantomeB, &fantomeC, &fantomeD); //On génère l'arène
            renduarene(terrain); //On effectue un rendu sur l'arène précédement générée afin d'avoir un résultat plus joli
            affichage(terrain, 0, 0, 0, 3); //On affiche une première fois le terrain
            deplacements(terrain, &PacMan, &fantomeA, &fantomeB, &fantomeC, &fantomeD); //On lance la gestion des déplacements
            break;

        case 2:
            system("CLS");
            maxi = lectureScore(pseudo, score);
            triScore(pseudo, score, maxi);
            break;

        default:
            break;

        }
    }while(mode>0 && mode<3);

    return 0;
}
Example #28
0
void	colle(int x, int y)
{
	int col;
	int lin;

	col = 1;
	lin = 1;
	while (lin <= y)
	{
		while (col <= x)
		{
			ft_putchar(affichage(lin, col, x, y));
			col++;
		}
		ft_putchar('\n');
		col = 1;
		lin++;
	}
}
Example #29
0
void affichage(leaf_t *root) {
	size_t i=0;

	if (root->n_children > 0) {
		for (; i < root->n_children; i++) {
			affichage(root->children[i]);
		}
	} else {
		leaf_t *temp = root;
		
        fprintf(stdout, "Solution: ");
        while (temp != NULL) {
			fprintf(stdout, " %lu = %lu ", temp->name, temp->value);
			temp = temp->ancestor;

		}

		fprintf(stdout, "\n");
	}
}
Example #30
0
File: tp7.cpp Project: dtbinh/M1S2
void render_scene(){

	int rayon = 10;
	int hauteur = 30;
	Point centre(0,0,0);
	std::vector<Triangle> listeTriangle;
	
	//listeTriangle = triangulationCylindre(rayon, hauteur);
	//listeTriangle = triangulationSphere(centre, rayon);
	listeTriangle = triangulationCube(rayon);
	
	affichage(listeTriangle);
	
	//affichageGauss(listeTriangle);
	
	//afficheNormale(listeTriangle);
	
	aretesVives(listeTriangle, 90);
	

}