csolve_VPSC.cpp
generate-constraints.cpp
pairingheap/PairingHeap.cpp
- remove_rectangle_overlap.cpp
solve_VPSC.cpp
variable.cpp
)
libvpsc_C_la_SOURCES = \
block.cpp blocks.cpp constraint.cpp generate-constraints.cpp \
- pairingheap/PairingHeap.cpp remove_rectangle_overlap.cpp \
+ pairingheap/PairingHeap.cpp \
solve_VPSC.cpp csolve_VPSC.cpp variable.cpp
EXTRA_DIST = vpsc.vcxproj*
class Rectangle {
friend std::ostream& operator <<(std::ostream &os, const Rectangle &r);
public:
- static double xBorder,yBorder;
Rectangle(double x, double X, double y, double Y);
- double getMaxX() const { return maxX+xBorder; }
- double getMaxY() const { return maxY+yBorder; }
+ double getMaxX() const { return maxX; }
+ double getMaxY() const { return maxY; }
double getMinX() const { return minX; }
double getMinY() const { return minY; }
double getMinD(unsigned const d) const {
double getCentreY() const { return minY+height()/2.0; }
double width() const { return getMaxX()-minX; }
double height() const { return getMaxY()-minY; }
- static void setXBorder(double x) {xBorder=x;}
- static void setYBorder(double y) {yBorder=y;}
void moveCentreX(double x) {
moveMinX(x-width()/2.0);
}
moveMinY(y-height()/2.0);
}
void moveMinX(double x) {
- maxX=x+width()-xBorder;
+ maxX=x+width();
minX=x;
}
void moveMinY(double y) {
- maxY=y+height()-yBorder;
+ maxY=y+height();
minY=y;
}
double overlapX(const Rectangle &r) const {
+++ /dev/null
-/**
- * \brief remove overlaps between a set of rectangles.
- *
- * Authors:
- * Tim Dwyer <tgdwyer@gmail.com>
- *
- * Copyright (C) 2005 Authors
- *
- * This version is released under the CPL (Common Public License) with
- * the Graphviz distribution.
- * A version is also available under the LGPL as part of the Adaptagrams
- * project: https://github.com/mjwybrow/adaptagrams.
- * If you make improvements or bug fixes to this code it would be much
- * appreciated if you could also contribute those changes back to the
- * Adaptagrams repository.
- */
-
-#include <iostream>
-#include <cassert>
-#include <vpsc/generate-constraints.h>
-#include <vpsc/solve_VPSC.h>
-#include <vpsc/variable.h>
-#include <vpsc/constraint.h>
-#include <fstream>
-#include <vpsc/blocks.h>
-#include <vector>
-using std::ios;
-using std::ofstream;
-
-#ifndef RECTANGLE_OVERLAP_LOGGING
- #define RECTANGLE_OVERLAP_LOGGING 0
-#endif
-
-#define EXTRA_GAP 0.0001
-
-double Rectangle::xBorder=0;
-double Rectangle::yBorder=0;
<ClCompile Include="csolve_VPSC.cpp" />
<ClCompile Include="generate-constraints.cpp" />
<ClCompile Include="pairingheap\PairingHeap.cpp" />
- <ClCompile Include="remove_rectangle_overlap.cpp" />
<ClCompile Include="solve_VPSC.cpp" />
<ClCompile Include="variable.cpp" />
</ItemGroup>
<ClCompile Include="pairingheap\PairingHeap.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="remove_rectangle_overlap.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="solve_VPSC.cpp">
<Filter>Source Files</Filter>
</ClCompile>