Parallel Coordinate System with Time Series Data
VP_Wall.h
Go to the documentation of this file.
1 #pragma once
2 #include "PCAxis.h"
3 #include "Painter2D.h"
4 
14 class VP_Wall
15 {
16 private:
17  QVector2D lastMousePos;
18  float area(float x1, float y1, float x2, float y2, float x3, float y3);
19  //QVector2D Adrag, Bdrag, Cdrag, Ddrag;
20  QVector2D back_border_left;
21  QVector2D back_border_right;
22  QVector2D front_border_left;
23  QVector2D front_border_right;
24  float front_height;
25  float back_height;
26  std::vector<QVector2D> bezierPoints;
27  void updateAxis(PCAxis* a1, PCAxis* a2, std::unordered_map<std::string, QVector2D> v1, std::unordered_map<std::string, QVector2D> v2);
28  QVector2D calcWallVP(PCAxis* a1, PCAxis* a2);
29  QVector2D vp;
30 
31 public:
32  VP_Wall(std::vector<PCAxis*> addAxes, QVector2D vanishingPoint);
33  ~VP_Wall();
34 
35 
36  std::vector<PCAxis*> addAxes;
37  std::vector<bool> addAxesDrag;
38  void update(std::vector<std::unordered_map<std::string, QVector2D>> values);
39  void drag(QVector2D mousePos, QVector2D vanishingPoint);
40  bool dragLine(QVector2D pos, PCAxis* axis);
41  void draw(Painter2D* painter2D, QPainter* qPainter);
42  void click(QVector2D mousePos);
43  bool inPolygon(QVector2D point, std::vector<QVector2D> points);
44  bool inRectangle(QVector2D pos, QVector2D A, QVector2D B, QVector2D C, QVector2D D);
45  void release();
46  void setVanishingBorderLeft(QVector2D back_border_left, float height);
47 
48  void setVanishingBorderRight(QVector2D back_border_right);
49 
50  void setFrontBorderLeft(QVector2D front_border_left, float height);
51 
52  void setFrontBorderRight(QVector2D front_border_right);
53 
54  QVector2D calcBezier(float u, QVector2D p0, QVector2D p1, QVector2D p2, QVector2D p3);
55 
56  void dragAxis(PCAxis* a, QVector2D mousePos, QVector2D vanishingPoint);
57 
58 };
59 
A PC Axis, which represents one axis in the PC System. It holds its positional values on the plane an...
Definition: PCAxis.h:17
A 2D painter.
Definition: Painter2D.h:15
A Wall of a VP_Widget. It basically shows the wall and the Lines of a Vanishing Point Widget.
Definition: VP_Wall.h:15
void drag(QVector2D mousePos, QVector2D vanishingPoint)
Drags.
Definition: VP_Wall.cpp:351
void dragAxis(PCAxis *a, QVector2D mousePos, QVector2D vanishingPoint)
Drag axis.
Definition: VP_Wall.cpp:267
void click(QVector2D mousePos)
Clicks the given mouse position.
Definition: VP_Wall.cpp:454
void release()
Releases this object.
Definition: VP_Wall.cpp:619
void setVanishingBorderLeft(QVector2D back_border_left, float height)
Sets vanishing border left.
Definition: VP_Wall.cpp:639
void draw(Painter2D *painter2D, QPainter *qPainter)
Draws.
Definition: VP_Wall.cpp:376
VP_Wall(std::vector< PCAxis * > addAxes, QVector2D vanishingPoint)
Constructor.
Definition: VP_Wall.cpp:16
QVector2D calcBezier(float u, QVector2D p0, QVector2D p1, QVector2D p2, QVector2D p3)
Calculates the bezier.
Definition: VP_Wall.cpp:237
std::vector< PCAxis * > addAxes
Definition: VP_Wall.h:36
bool dragLine(QVector2D pos, PCAxis *axis)
Drag line.
Definition: VP_Wall.cpp:575
void setFrontBorderLeft(QVector2D front_border_left, float height)
Sets front border left.
Definition: VP_Wall.cpp:673
void setVanishingBorderRight(QVector2D back_border_right)
Sets vanishing border right.
Definition: VP_Wall.cpp:656
std::vector< bool > addAxesDrag
Definition: VP_Wall.h:37
bool inRectangle(QVector2D pos, QVector2D A, QVector2D B, QVector2D C, QVector2D D)
In rectangle.
Definition: VP_Wall.cpp:538
void update(std::vector< std::unordered_map< std::string, QVector2D >> values)
Updates the given values.
Definition: VP_Wall.cpp:210
~VP_Wall()
Destructor.
Definition: VP_Wall.cpp:40
bool inPolygon(QVector2D point, std::vector< QVector2D > points)
In polygon.
Definition: VP_Wall.cpp:505
void setFrontBorderRight(QVector2D front_border_right)
Sets front border right.
Definition: VP_Wall.cpp:690