52 lines
1.2 KiB
C++
Executable File
52 lines
1.2 KiB
C++
Executable File
#ifndef OBJET3D_H
|
|
#define OBJET3D_H
|
|
#include "point3D.h"
|
|
#include <deque>
|
|
#include <QString>
|
|
|
|
class face {
|
|
public:
|
|
unsigned int S1;
|
|
unsigned int S2;
|
|
unsigned int S3;
|
|
};
|
|
class Objet3D
|
|
{
|
|
public:
|
|
Objet3D(QString = QString(""));
|
|
Objet3D(const Objet3D&); // recopie
|
|
|
|
|
|
bool charger_Off(QString objet);
|
|
//bool loadObj(QString objet);
|
|
void calcul_normales_points();
|
|
void calcul_normales_faces();
|
|
static void calcul_normales_point(deque<point3D>& lnp, deque<point3D>& lnf, deque<point3D>& lp, deque<face>& lf,deque<uint>&);
|
|
static void calcul_normales_face(deque<point3D>& lnf, deque<point3D>& lp, deque<face>& lf, uint debut, uint fin);
|
|
bool smooth, ligth;
|
|
|
|
void interpolation(const Objet3D& debut, const Objet3D& fin, const float& t);
|
|
|
|
void affiche() const;
|
|
void draw_normale_faces() const;
|
|
void draw_normale_point() const;
|
|
private :
|
|
QString nom;
|
|
|
|
unsigned int nbsommets;
|
|
unsigned int nbfaces;
|
|
|
|
unsigned int id;
|
|
|
|
deque<point3D> lpoints;
|
|
deque<face> lfaces;
|
|
deque<point3D> lpointsnormales;
|
|
deque<point3D> lfacesnormales;
|
|
|
|
point3D min;
|
|
point3D max;
|
|
point3D centroid;
|
|
};
|
|
|
|
#endif // OBJET3D_H
|