00001 #ifndef MY_FACEINFOCASH 00002 #define MY_FACEINFOCASH 00003 00004 00005 00006 class FaceInfoCash 00007 { 00008 00009 public: 00010 unsigned c1,c2; 00011 char normal; 00012 public: 00013 FaceInfoCash(){c1=c2=OrthoMesh::INVALID_INDEX;} 00014 bool at_boundary() const {return c1 == OrthoMesh::INVALID_INDEX || c2 == OrthoMesh::INVALID_INDEX;} 00015 void getAdjCellIndices(unsigned &index1,unsigned &index2) const{index1=c1;index2=c2;} 00016 double normal_multiply(double *v) const{return v[static_cast<int>(normal)];} 00017 OrthoMesh::NORMAL_AXIS getNormalOrientation() const {return static_cast<OrthoMesh::NORMAL_AXIS>(normal);} 00018 unsigned getNormalNonZeroComponent() const{return normal;} 00019 bool hasPosCell() const {return c2!=OrthoMesh::INVALID_INDEX;} 00020 bool hasNegCell() const {return c1!=OrthoMesh::INVALID_INDEX;} 00021 00022 }; 00023 00024 00025 #endif