00001 /**************************************************************************** 00002 * VCGLib o o * 00003 * Visual and Computer Graphics Library o o * 00004 * _ O _ * 00005 * Copyright(C) 2004 \/)\/ * 00006 * Visual Computing Lab /\/| * 00007 * ISTI - Italian National Research Council | * 00008 * \ * 00009 * All rights reserved. * 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 * This program is distributed in the hope that it will be useful, * 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00019 * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * 00020 * for more details. * 00021 * * 00022 ****************************************************************************/ 00023 /**************************************************************************** 00024 History 00025 00026 $Log: not supported by cvs2svn $ 00027 00028 ****************************************************************************/ 00029 #ifndef __VCG_EDGE_UPDATE_BOUNDING 00030 #define __VCG_EDGE_UPDATE_BOUNDING 00031 00032 namespace vcg { 00033 namespace edg { 00034 00037 00040 template <class ComputeMeshType> 00041 class UpdateBounding 00042 { 00043 00044 public: 00045 typedef ComputeMeshType MeshType; 00046 typedef typename MeshType::VertexType VertexType; 00047 typedef typename MeshType::VertexPointer VertexPointer; 00048 typedef typename MeshType::VertexIterator VertexIterator; 00049 typedef typename MeshType::EdgeType EdgeType; 00050 typedef typename MeshType::EdgePointer EdgePointer; 00051 typedef typename MeshType::EdgeIterator EdgeIterator; 00052 00054 static void Box(ComputeMeshType &m) 00055 { 00056 m.bbox.SetNull(); 00057 VertexIterator vi; 00058 for(vi=m.vert.begin();vi!=m.vert.end();++vi) 00059 if( !(*vi).IsD() ) m.bbox.Add((*vi).P()); 00060 00061 } 00062 00063 00064 }; // end class 00065 00066 } // End namespace 00067 } // End namespace 00068 00069 00070 #endif