The Parametric Pseudo-Manifold (PPS) Library 1.0
face.h
Go to the documentation of this file.
00001 
00026 #ifndef FACE_H
00027 #define FACE_H
00028 
00029 #include "halfedge.h"   // Halfedge
00030 
00031 
00047 namespace dcel {
00048 
00055   template < 
00056              typename VAttrib ,
00057              typename FAttrib ,
00058              typename EAttrib ,
00059              typename HAttrib
00060            >
00061   class Face {
00062   public:
00063     // ---------------------------------------------------------------
00064     //
00065     // Type definitions
00066     //
00067     // ---------------------------------------------------------------
00068 
00075     typedef dcel::Halfedge< VAttrib, FAttrib , EAttrib , HAttrib > 
00076       Halfedge ;
00077 
00078 
00079     // ---------------------------------------------------------------
00080     //
00081     // Public methods
00082     //
00083     // ---------------------------------------------------------------
00084 
00092     Face( Halfedge* h ) : _halfedge( h )
00093     {}
00094 
00095 
00101     ~Face()
00102     {
00103       set_halfedge( 0 ) ;
00104     }
00105 
00106 
00114     Halfedge* get_halfedge() const
00115     {
00116       return _halfedge ; 
00117     }
00118 
00119 
00128     void set_halfedge( Halfedge* h )
00129     {
00130       _halfedge = h ; 
00131     }
00132 
00133 
00142     FAttrib& get_attributes()
00143     {
00144       return _attributes ; 
00145     }
00146 
00147 
00148 
00149   private:
00150     // ---------------------------------------------------------------
00151     //
00152     // Private data members
00153     //
00154     // ---------------------------------------------------------------
00155 
00156     Halfedge* _halfedge ;   
00157 
00158 
00159     FAttrib _attributes ;   
00160 
00161   } ;
00162 
00163 }
00164  //end of group class.
00166 
00167 #endif   // FACE_H
00168