2#pragma warning(disable : 4786)
14#include "qwt3d_global.h"
17#define WHEEL_DELTA 120
20#include "qwt3d_portability.h"
21#include "qwt3d_helper.h"
26const double Qwt3D_PI = 3.14159265358979323846264338328;
129enum INTERIOR_DIRECTION
188 Tuple(
double X,
double Y) : x(X), y(Y)
203 explicit Triple(
double xv = 0,
double yv = 0,
double zv = 0) : x(xv), y(yv), z(zv)
207#ifndef QWT3D_NOT_FOR_DOXYGEN
249 Triple& operator*=(
double d)
257 Triple& operator/=(
double d)
274 bool operator!=(
Triple t)
const
276 return !isPracticallyZero(x, t.x) || !isPracticallyZero(y, t.y) || !isPracticallyZero(z, t.z);
279 bool operator==(
Triple t)
const
281 return !operator!=(t);
284 double length()
const
286 double l2 = x * x + y * y + z * z;
287 return (isPracticallyZero(l2)) ? 0 : sqrt(l2);
371using FreeVectorField = std::vector< FreeVector >;
376using TripleField = std::vector< Triple >;
381using Cell = std::vector< unsigned >;
386using CellField = std::vector< Cell >;
389unsigned tesselationSize(CellField
const& t);
396 RGBA() : r(0), g(0), b(0), a(1)
399 RGBA(
double rr,
double gg,
double bb,
double aa = 1) : r(rr), g(gg), b(bb), a(aa)
408using ColorVector = std::vector< RGBA >;
410#ifndef QWT3D_NOT_FOR_DOXYGEN
413QWT3D_EXPORT QColor GL2Qt(
double r,
double g,
double b);
415QWT3D_EXPORT
RGBA Qt2GL(QColor col);
417using Vertex =
double*;
418using DataRow = std::vector< Vertex >;
419using DataMatrix = std::vector< DataRow >;
435 virtual void clear() = 0;
437 virtual bool empty()
const = 0;
464 void setSize(
unsigned int columns,
unsigned int rows);
470 void setPeriodic(
bool u,
bool v);
471 bool uperiodic()
const;
472 bool vperiodic()
const;
496 return cells.empty();
499 Triple const& operator()(
unsigned cellnumber,
unsigned vertexnumber);
513 n.x = u.y * v.z - u.z * v.y;
514 n.y = u.z * v.x - u.x * v.z;
515 n.z = u.x * v.y - u.y * v.x;
518 double l = n.length();
528inline double dotProduct(
Triple const& u,
Triple const& v)
530 return u.x * v.x + u.y * v.y + u.z * v.z;
533void convexhull2d(std::vector< unsigned >& idx,
const std::vector< Tuple >& src);
545 std::vector<std::vector<double>>
z;
546 unsigned int columns = 0;
547 unsigned int rows = 0;
563 unsigned int columns = 0;
564 unsigned int rows = 0;
565 bool uperiodic =
false;
566 bool vperiodic =
false;
586 Rtti_Plot3DSurface = 1001,
589 Rtti_Plot3DBar = 1002,
592 Rtti_Plot3DLine = 1003
Implements a graph-like cell structure with limit access functions
Definition qwt3d_types.h:481
Abstract base class for plot data
Definition qwt3d_types.h:427
Implements a matrix of z-Values with limit access functions
Definition qwt3d_types.h:448
Free vector
Definition qwt3d_types.h:354
Parallelepiped spanned by 2 Triples
Definition qwt3d_types.h:334
Result of evaluating a Qwt3DFunction over its grid
Definition qwt3d_types.h:543
std::vector< std::vector< double > > z
z[i][j] = z-value at column i, row j
Definition qwt3d_types.h:545
Result of evaluating a Qwt3DParametricSurface over its grid
Definition qwt3d_types.h:560
std::vector< std::vector< Triple > > vertices
vertices[i][j] = xyz position at column i, row j
Definition qwt3d_types.h:562
Red-Green-Blue-Alpha value
Definition qwt3d_types.h:395
Triple [x,y,z]
Definition qwt3d_types.h:201
Tuple [x,y]
Definition qwt3d_types.h:182