00001 /*************************************************************************** 00002 face.h - description 00003 ------------------- 00004 begin : Fri Dec 12 2003 00005 copyright : (C) 2003 by Roman Geus 00006 email : roman.geus@psi.ch 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef FACE_H 00019 #define FACE_H 00020 00021 #include <cassert> 00022 #include "entity.h" 00023 00024 namespace mesh { 00025 00026 class Point; 00027 class Edge; 00028 class Tet; 00029 class TetMesh; 00030 00034 class Face : public Entity { 00035 public: 00044 Face(id_t id, id_t node0, id_t node1, id_t node2, id_t tet); 00048 id_t get_corner_id(int i) const; 00052 Point* get_corner(int i) const; 00056 id_t get_edge_id(int i) const; 00060 Edge* get_edge(int i) const; 00064 id_t get_tet_id() const { 00065 return _tets[0]; 00066 } 00072 void get_tet_ids(id_t* tet_id0, id_t* tet_id1) const { 00073 *tet_id0 = _tets[0]; 00074 *tet_id1 = _tets[1]; 00075 } 00082 void set_tet_id(id_t tet_id) { 00083 assert(_tets[1] == ID_NONE); 00084 _tets[1] = tet_id; 00085 } 00086 protected: 00090 TetMesh* get_mesh() const; 00091 private: // private variables 00093 id_t _tets[2]; 00094 }; 00095 00096 } // namespace mesh 00097 00098 #endif