File indexing completed on 2024-04-21 03:40:38

0001 /*************************************************************************************
0002  *  Copyright (C) 2010-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 ABSTRACTSPACECURVE_H
0020 #define ABSTRACTSPACECURVE_H
0021 
0022 #include "abstractfunctiongraph.h"
0023 
0024 #define CONSTRUCTORS(name) \
0025 name (const Analitza::Expression &functionExpression, const QSharedPointer<Analitza::Variables>& variables) :AbstractSpaceCurve(functionExpression, variables) { }
0026 
0027 namespace Analitza {
0028 class Variables;
0029 
0030 class AbstractSpaceCurve : public AbstractFunctionGraph 
0031 {
0032 public:
0033     explicit AbstractSpaceCurve(const Analitza::Expression& e, const QSharedPointer<Analitza::Variables>& v = {});
0034     ~AbstractSpaceCurve() override;
0035 
0036     //Curve ... los expongo como publicos tanto para planecurve como para los backend (
0037     //para los backends por un tema de performance y flexibilidad) 
0038     // al final en planecurve todo estara expuesto consistentemente 
0039     QVector<QVector3D> points;
0040     QVector<int> jumps;
0041 
0042     //Own
0043     virtual void update(const QVector3D & oppositecorner1, const QVector3D & oppositecorner2) = 0;
0044 
0045 protected:
0046     bool addPoint(const QVector3D& p);
0047 
0048 private:
0049     AbstractSpaceCurve();
0050 };
0051 
0052 }
0053 
0054 #endif // ABSTRACTSPACECURVE_H