1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
|
// This file is part of ff3d - http://www.freefem.org/ff3d
// Copyright (C) 2003 Pascal Hav
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// $Id: WorkingMesh.hpp,v 1.2 2006/11/02 15:41:25 delpinux Exp $
#ifndef WORKING_MESH_HPP
#define WORKING_MESH_HPP
#include <ReferenceCounting.hpp>
#include <Vertex.hpp>
#include <Triangle.hpp>
/**
* @file WorkingMesh.hpp
* @author Stephane Del Pino
* @date Sat May 15 19:12:02 2004
*
* @brief This class is dedicated to the construction of meshes.
*
* @todo Make this class more general to deal not only with surface
* meshes of triangles
*/
class WorkingMesh
{
private:
typedef std::set<ReferenceCounting<Vertex> > VerticesList;
typedef std::set<ReferenceCounting<Triangle> > ElementsList;
VerticesList __vertices; /**< list of vertices */
ElementsList __elements; /**< list of elements */
/**
* Copy constructor is forbiden
*
* @param wm
*/
WorkingMesh(const WorkingMesh& wm);
/**
* This affectation is forbiden
*
* @param wo a given working mesh
*
* @return a const reference to the current object
*/
const WorkingMesh& operator=(const WorkingMesh& wo);
public:
/**
* inserts a vertex in the list
*
* @param v the vertex to be inserted
*/
void insert(Vertex* v)
{
__vertices.insert(v);
}
/**
* inserts a triangle in the list
*
* @param t the triangle to add
*/
void insert(Triangle* t)
{
__elements.insert(t);
}
/**
* Default constructor
*
*/
WorkingMesh()
{
;
}
/**
* Destructor
*
*/
~WorkingMesh()
{
;
}
};
#endif // WORKING_MESH_HPP
|