MeVisLabToolboxReference
|
00001 // **InsertLicense** code 00002 //---------------------------------------------------------------------------------- 00004 00011 #ifndef __WEMIndexedFace_H 00012 #define __WEMIndexedFace_H 00013 00014 #include "MLWEMIncludes.h" 00015 #include "WEMDataStructure/WEMVector.h" 00016 #include "WEMPatch.h" 00017 00018 ML_START_NAMESPACE 00019 00021 00023 class MLWEM_EXPORT WEMIndexedFace 00024 { 00025 00026 public: 00027 00029 WEMIndexedFace(); 00030 00032 WEMIndexedFace(const WEMIndexedFace& f); 00033 00035 virtual ~WEMIndexedFace(); 00036 00038 inline unsigned int getNumIndices() const { return static_cast<unsigned int>(_indices.size()); } 00040 inline int getIndexAt(unsigned int index) const { return _indices[index]; } 00042 inline void addIndex(int index) { _indices.push_back(index); } 00043 00045 inline unsigned int getNumTextelIndices() const { return static_cast<unsigned int>(_tindices.size()); } 00047 inline int getTextelIndexAt(unsigned int index) const { return _tindices[index]; } 00049 inline void addTextelIndex(int index) { _tindices.push_back(index); } 00050 00052 inline Vector3 getNormal() const { return _normal; } 00054 inline void setNormal(Vector3 normal) { _normal = normal; } 00055 00057 void mirror(); 00058 00060 WEMVector<WEMIndexedFace>* tessellate(WEMPatch* wemPatch); 00061 00062 private: 00063 00065 std::vector<int> _indices; 00066 00068 std::vector<int> _tindices; 00069 00071 Vector3 _normal; 00072 00073 }; 00074 00076 00077 ML_END_NAMESPACE 00078 00079 #endif // __WEMIndexedFace_H