#ifndef INC_FACET_H #define INC_FACET_H #include #include #define Vecteur3D Point3D class Point3D { public: float x,y,z; Point3D(float xx=0,float yy=0,float zz=0) {x=xx;y=yy;z=zz;} }; class Vertex { public: Vertex() {nb=0;}; Point3D p; Vecteur3D n; int nb; }; typedef std::list LVertex; typedef enum {PLUS,MOINS} Signe; class Facet { public: LVertex v; Vecteur3D n; Point3D A; Facet() {v.clear();} Facet(Point3D AA,Vecteur3D nn) {v.clear();A=AA;n=nn;} void calculerNormale(); void initA(); void tracer(int wait); void tracer(); void tracer2(); void ajouter(Vertex *vv) {v.push_back(vv);} }; typedef std::list LFacet; typedef std::vector AVertex; typedef LFacet::const_iterator ItFacet; typedef LVertex::const_iterator ItVertex; typedef AVertex::const_iterator ItAVertex; class MObjet { public: LFacet f; AVertex v; }; typedef std::list LFacet; typedef LFacet::const_iterator ItFacet; typedef LVertex::const_iterator ItVertex; void tracer(Facet f); void tracer(LFacet l); void calculerNormale(LFacet *l); void initA(LFacet *l); void calculerNormaleSommet(MObjet *l); void gonfler(MObjet o,float k); void tracerNormale(AVertex a); void tracer(MObjet o); #endif