File indexing completed on 2023-10-01 07:35:33
0001 /************************************************************************************* 0002 * Copyright (C) 2012 by Percy Camilo T. Aucahuasi <percy.camilo.ta@gmail.com> * 0003 * * 0004 * This program is free software; you can redistribute it and/or * 0005 * modify it under the terms of the GNU General Public License * 0006 * as published by the Free Software Foundation; either version 2 * 0007 * of the License, or (at your option) any later version. * 0008 * * 0009 * This program is distributed in the hope that it will be useful, * 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0012 * GNU General Public License for more details. * 0013 * * 0014 * You should have received a copy of the GNU General Public License * 0015 * along with this program; if not, write to the Free Software * 0016 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 0017 *************************************************************************************/ 0018 0019 #ifndef SURFACE_H 0020 #define SURFACE_H 0021 0022 #include "functiongraph.h" 0023 0024 #include <QVector3D> 0025 0026 namespace Analitza { 0027 0028 /** 0029 * \class Surface 0030 * 0031 * \ingroup AnalitzaPlotModule 0032 * 0033 * \brief Represents a surface in 3D space. 0034 * 0035 * This class contains all necessary data that Plotter3D will use to draw the surface. 0036 */ 0037 0038 class ANALITZAPLOT_EXPORT Surface : public FunctionGraph 0039 { 0040 public: 0041 explicit Surface(AbstractFunctionGraph* g); 0042 0043 ~Surface() override; 0044 0045 //Own 0046 0047 /** Update the surfaces's data @p oppositecorner1 and @p oppositecorner2 form an axis-aligned bounding box. */ 0048 void update(const QVector3D& oppositecorner1, const QVector3D& oppositecorner2); 0049 0050 // Surface data 0051 QVector<QVector3D> vertices() const; 0052 QVector<QVector3D> normals() const; 0053 QVector<unsigned int> indexes() const; 0054 }; 0055 0056 } 0057 0058 #endif // SURFACE_H