The Parametric Pseudo-Manifold (PPS) Library 1.0
face_attribute.h
Go to the documentation of this file.
00001 
00027 #ifndef FACE_ATTRIBUTE_H
00028 #define FACE_ATTRIBUTE_H
00029 
00030 #include "pntriangle.h"   // PNTriangle
00031 
00032 
00047 namespace ppsfrompnt {
00048 
00056   class FaceAttribute {
00057   public:
00058     // ---------------------------------------------------------------
00059     //
00060     // Public methods.
00061     //
00062     // ---------------------------------------------------------------
00063 
00069     FaceAttribute() : _patch( 0 )
00070     {}
00071 
00072 
00081     FaceAttribute( PNTriangle* patch ) : _patch( patch )
00082     {}
00083 
00084 
00092     FaceAttribute( const FaceAttribute& a )
00093     {
00094       _patch = new PNTriangle( *( a.get_patch() ) ) ;
00095     }
00096 
00097 
00104     ~FaceAttribute() 
00105     {
00106       if ( get_patch() != 0 ) delete get_patch() ;
00107     }
00108 
00109 
00119     PNTriangle* get_patch() const
00120     {
00121       return _patch ; 
00122     }
00123 
00124 
00134     void set_patch( PNTriangle* patch )
00135     {
00136       _patch = patch ; 
00137     }
00138 
00139   private:
00140     // ---------------------------------------------------------------
00141     //
00142     // Private data member
00143     //
00144     // ---------------------------------------------------------------
00145 
00146     PNTriangle* _patch ;   
00147 
00148   } ;
00149 
00150 }
00151  //end of group class.
00153 
00154 #endif  // FACE_ATTRIBUTE_H