00001 #ifndef _FACE_INFO 00002 #define _FACE_INFO 00003 00004 #include "orthomesh.h" 00024 class FaceInfo { 00025 public: 00026 00027 Index index; 00028 unsigned normal; 00029 Index cell1,cell2; 00030 bool at_boundary; 00031 00032 00033 FaceInfo(const OrthoMesh::Cash_Face_It &face) 00034 { 00035 index = face->index(); 00036 normal = face->getNormalOrientation(); 00037 face->getAdjCellIndices(cell1,cell2); 00038 if (cell1 == OrthoMesh::INVALID_INDEX) 00039 { 00040 at_boundary = true; 00041 cell1=cell2; 00042 } 00043 if (cell2 == OrthoMesh::INVALID_INDEX) 00044 { 00045 at_boundary = true; 00046 cell2=cell1; 00047 } 00048 } 00049 FaceInfo(const OrthoMesh::Face_It &face) 00050 { 00051 index = face->index(); 00052 face->getAdjCellIndices(cell1,cell2); 00053 normal = face->getNormalOrientation(); 00054 if (cell1 == OrthoMesh::INVALID_INDEX) 00055 { 00056 at_boundary = true; 00057 cell1=cell2; 00058 } 00059 if (cell2 == OrthoMesh::INVALID_INDEX) 00060 { 00061 at_boundary = true; 00062 cell2=cell1; 00063 } 00064 } 00065 }; 00066 #endif