2#pragma warning(disable : 4786)
14#include "qwt3d_global.h"
21#define WHEEL_DELTA 120
24#include "qwt3d_portability.h"
25#include "qwt3d_helper.h"
26#include "qwt3d_openglhelper.h"
32const double PI = 3.14159265358979323846264338328;
157 Tuple(
double X,
double Y) : x(X), y(Y)
172 explicit Triple(
double xv = 0,
double yv = 0,
double zv = 0) : x(xv), y(yv), z(zv)
176#ifndef QWT3D_NOT_FOR_DOXYGEN
218 Triple& operator*=(
double d)
226 Triple& operator/=(
double d)
243 bool operator!=(
Triple t)
const
245 return !isPracticallyZero(x, t.x) || !isPracticallyZero(y, t.y) || !isPracticallyZero(z, t.z);
248 bool operator==(
Triple t)
const
250 return !operator!=(t);
253 double length()
const
255 double l2 = x * x + y * y + z * z;
256 return (isPracticallyZero(l2)) ? 0 : sqrt(l2);
271inline const Triple operator-(
const Triple& t,
const Triple& t2)
273 return Triple(t) -= t2;
275inline const Triple operator*(
double d,
const Triple& t)
277 return Triple(t) *= d;
279inline const Triple operator*(
const Triple& t,
double d)
281 return Triple(t) *= d;
283inline const Triple operator/(
double d,
const Triple& t)
285 return Triple(t) /= d;
287inline const Triple operator/(
const Triple& t,
double d)
289 return Triple(t) /= d;
291inline const Triple operator*(
const Triple& t,
const Triple& t2)
293 return Triple(t) *= t2;
340using FreeVectorField = std::vector< FreeVector >;
345using TripleField = std::vector< Triple >;
350using Cell = std::vector< unsigned >;
355using CellField = std::vector< Cell >;
358unsigned tesselationSize(Qwt3D::CellField
const& t);
365 RGBA() : r(0), g(0), b(0), a(1)
368 RGBA(
double rr,
double gg,
double bb,
double aa = 1) : r(rr), g(gg), b(bb), a(aa)
377using ColorVector = std::vector< RGBA >;
379#ifndef QWT3D_NOT_FOR_DOXYGEN
382QWT3D_EXPORT QColor GL2Qt(GLdouble r, GLdouble g, GLdouble b);
386using Vertex =
double*;
387using DataRow = std::vector< Vertex >;
388using DataMatrix = std::vector< DataRow >;
397 QWT_DECLARE_PRIVATE(
Data)
400 Qwt3D::DATATYPE datatype;
404 virtual void clear() = 0;
406 virtual bool empty()
const = 0;
423 GridData(
unsigned int columns,
unsigned int rows);
433 void setSize(
unsigned int columns,
unsigned int rows);
439 void setPeriodic(
bool u,
bool v);
440 bool uperiodic()
const;
441 bool vperiodic()
const;
454 datatype = Qwt3D::POLYGON;
465 return cells.empty();
468 Triple const& operator()(
unsigned cellnumber,
unsigned vertexnumber);
482 n.x = u.y * v.z - u.z * v.y;
483 n.y = u.z * v.x - u.x * v.z;
484 n.z = u.x * v.y - u.y * v.x;
487 double l = n.length();
497inline double dotProduct(Triple
const& u, Triple
const& v)
499 return u.x * v.x + u.y * v.y + u.z * v.z;
502void convexhull2d(std::vector< unsigned >& idx,
const std::vector< Qwt3D::Tuple >& src);
Implements a graph-like cell structure with limit access functions
Definition qwt3d_types.h:450
Abstract base class for plot data
Definition qwt3d_types.h:396
Implements a matrix of z-Values with limit access functions
Definition qwt3d_types.h:417
Free vector
Definition qwt3d_types.h:323
Parallelepiped spanned by 2 Triples
Definition qwt3d_types.h:303
Red-Green-Blue-Alpha value
Definition qwt3d_types.h:364
Triple [x,y,z]
Definition qwt3d_types.h:170
Tuple [x,y]
Definition qwt3d_types.h:151