32 #ifndef OPENPSTD_EDGES_H 33 #define OPENPSTD_EDGES_H 49 QVector2D _start, _end;
53 float StartInDim()
const;
55 float EndInDim()
const;
57 Edge CreateInSameDim(
float start,
float end)
const;
59 float PosInDim(
int dim)
const;
62 Edge(
float PosInDim,
int dim,
float start,
float end,
float absorption,
bool localReacting);
64 Edge(QVector2D start, QVector2D end,
float absorption,
bool localReacting);
66 bool IsOnlyInDim(
int dim)
const;
68 bool IsVertical()
const;
70 bool IsHorizontal()
const;
72 QVector2D GetStart()
const;
74 QVector2D GetEnd()
const;
76 float GetAbsorption()
const;
78 float GetLocalReacting()
const;
87 std::vector<Edge> Substract(
const Edge &edge)
const;
89 static std::vector<Edge> SubstractEdgeFromList(std::vector<Edge> edges,
Edge rhs);
91 static std::vector<Edge> SubstractListFromList(std::vector<Edge> lhs, std::vector<Edge> rhs);
93 static std::vector<Edge> SubstractListFromEdge(
Edge lhs, std::vector<Edge> rhs);
95 static std::vector<Edge> SubstractListFromEdge(
Edge lhs, std::vector<Edge> rhs,
96 std::vector<int> exceptIndices);
102 #endif //OPENPSTD_EDGES_H This is the general namespace of the OpenPSTD application.
Definition: Boundary.cpp:33
bool OnSameLine(const Edge &edge) const
Tests if the 2 edges are on the same line.
Definition: Edges.cpp:110
This class is specificaly for horizontal edges and vertical edges.
Definition: Edges.h:46