MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 //---------------------------------------------------------------------------------- 00004 00011 #ifndef __WEMPolygonPatch_H 00012 #define __WEMPolygonPatch_H 00013 00014 00015 #include "WEMPatch.h" 00016 #include "WEMPolygon.h" 00017 #include "WEMIndexedFace.h" 00018 00019 ML_START_NAMESPACE 00020 00022 00024 class MLWEM_EXPORT WEMPolygonPatch : public WEMPatch 00025 { 00026 public: 00027 00029 WEMPolygonPatch(unsigned int bs = 8192); 00032 WEMPolygonPatch(WEM* wem, unsigned int bs = 8192); 00034 WEMPolygonPatch(const WEMPolygonPatch &wemPatch); 00036 virtual ~WEMPolygonPatch(); 00038 virtual void dispose(); 00039 00041 virtual inline PatchTypes getPatchType() const { return WEM_PATCH_POLYGONS; } 00042 00044 00046 virtual inline unsigned int getNumFaces() const { return _polygons->num(); } 00048 inline WEMIndexVector<WEMPolygon>* getFaces() { return _polygons; } 00050 inline const WEMIndexVector<WEMPolygon>* getFaces() const { return const_cast<WEMPolygonPatch*>(this)->getFaces(); } 00051 00053 00055 virtual inline WEMFace* getFaceAt(unsigned int index) { return _polygons->at(index); } 00057 virtual inline const WEMFace* getFaceAt(unsigned int index) const { return const_cast<WEMPolygonPatch*>(this)->getFaceAt(index); } 00059 inline WEMPolygon* getPolygonAt(unsigned int index) { return _polygons->at(index); } 00061 inline const WEMPolygon* getPolygonAt(unsigned int index) const { return const_cast<WEMPolygonPatch*>(this)->getPolygonAt(index); } 00063 virtual WEMFace* addFace(); 00065 WEMPolygon* addPolygon(); 00067 void delPolygon(WEMPolygon* polygon); 00068 00070 00072 void convertIndexedFace(WEMIndexedFace* indexedFace); 00073 00074 private: 00075 00077 void _initMembers(unsigned int bs); 00079 WEMIndexVector<WEMPolygon>* _polygons; 00080 00081 }; 00082 00084 00085 ML_END_NAMESPACE 00086 00087 #endif // __WEMPolygonPatch_H