//=========================================================================== // GoTools Core - SINTEF Geometry Tools Core library, version 2.0.1 // // Copyright (C) 2000-2007, 2010 SINTEF ICT, Applied Mathematics, Norway. // // 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 version 2 of the License. // // 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. // // Contact information: E-mail: tor.dokken@sintef.no // SINTEF ICT, Department of Applied Mathematics, // P.O. Box 124 Blindern, // 0314 Oslo, Norway. // // Other licenses are also available for this software, notably licenses // for: // - Building commercial software. // - Building software whose source code you wish to keep private. //=========================================================================== 00015 #ifndef _LINECLOUDTESSELATOR_H 00016 #define _LINECLOUDTESSELATOR_H 00017 00018 00019 #include "GoTools/tesselator/Tesselator.h" 00020 #include "GoTools/geometry/LineCloud.h" 00021 00026 namespace Go 00027 { 00028 00029 class LineCloudTesselator : public Tesselator 00030 { 00031 public: 00032 LineCloudTesselator(const Go::LineCloud& lc) 00033 : orig_cloud_(lc), render_cloud_(lc), scale_(1.0) 00034 {} 00035 virtual ~LineCloudTesselator(); 00036 00037 void tesselate(); 00038 00039 const Go::LineCloud& getRenderCloud() 00040 { 00041 return render_cloud_; 00042 } 00043 00044 void setScale(double scale) 00045 { 00046 if (scale != scale_) { 00047 scale = scale_; 00048 tesselate(); 00049 } 00050 } 00051 double getScale() 00052 { 00053 return scale_; 00054 } 00055 00056 private: 00057 const Go::LineCloud& orig_cloud_; 00058 Go::LineCloud render_cloud_; 00059 double scale_; 00060 }; 00061 00062 } // namespace Go 00063 00064 00065 00066 #endif // _LINECLOUDTESSELATOR_H 00067