//=========================================================================== // 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. //===========================================================================

LineStrip.h

Go to the documentation of this file.
00001 #ifndef _LINESTRIP_H
00002 #define _LINESTRIP_H
00003 
00004 #include "GoTools/tesselator/GeneralMesh.h"
00005 #include <vector>
00006 
00007 
00008 namespace Go
00009 {
00010 
00014 class GO_API LineStrip : public GeneralMesh
00015 {
00016 public:
00017     virtual ~LineStrip();
00018     LineStrip(int n = 200);
00019 
00020     void resize(int n);
00021 
00022 
00023     virtual int numVertices()
00024     { return vert_.size()/3; }
00025 
00026     virtual double* vertexArray() { return &vert_[0]; }
00027     virtual double* paramArray() { return &param_[0]; }
00028      virtual int atBoundary(int idx);
00029     unsigned int* stripArray() { return &strip_[0]; }
00030     virtual unsigned int* triangleIndexArray() { return &strip_[0]; }
00031 
00032     virtual LineStrip* asLineStrip();
00033 
00034 private:
00035     std::vector<double> vert_;
00036     std::vector<double> param_;
00037     std::vector<unsigned int> strip_;
00038 };
00039 
00040 
00041 
00042 } // namespace Go
00043 
00044 
00045 
00046 
00047 
00048 #endif // end of #ifdef _LINESTRIP_H_
Generated on Tue Sep 21 15:44:17 2010 for GoTools Core by  doxygen 1.6.3