projects
/
universe.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleaning up for DL.
[universe.git]
/
polygon.cc
diff --git
a/polygon.cc
b/polygon.cc
index
4068919
..
35bbd9c
100644
(file)
--- a/
polygon.cc
+++ b/
polygon.cc
@@
-2,9
+2,13
@@
// Written and (C) by Francois Fleuret
// Contact <francois.fleuret@idiap.ch> for comments & bug reports
// Written and (C) by Francois Fleuret
// Contact <francois.fleuret@idiap.ch> for comments & bug reports
+#include <iostream>
+
#include <cmath>
#include "polygon.h"
#include <cmath>
#include "polygon.h"
+using namespace std;
+
static const scalar_t dl = 20.0;
static const scalar_t repulsion_constant = 0.2;
static const scalar_t dissipation = 0.5;
static const scalar_t dl = 20.0;
static const scalar_t repulsion_constant = 0.2;
static const scalar_t dissipation = 0.5;
@@
-47,6
+51,7
@@
Polygon *Polygon::clone() {
return new Polygon(_mass, _red, _green, _blue, _relative_x, _relative_y, _nb_vertices);
}
return new Polygon(_mass, _red, _green, _blue, _relative_x, _relative_y, _nb_vertices);
}
+#ifdef XFIG_SUPPORT
void Polygon::color_xfig(XFigTracer *tracer) {
tracer->add_color(int(255 * _red), int(255 * _green), int(255 * _blue));
}
void Polygon::color_xfig(XFigTracer *tracer) {
tracer->add_color(int(255 * _red), int(255 * _green), int(255 * _blue));
}
@@
-55,6
+60,7
@@
void Polygon::print_xfig(XFigTracer *tracer) {
tracer->draw_polygon(int(255 * _red), int(255 * _green), int(255 * _blue),
_nb_vertices, _x, _y);
}
tracer->draw_polygon(int(255 * _red), int(255 * _green), int(255 * _blue),
_nb_vertices, _x, _y);
}
+#endif
#ifdef X11_SUPPORT
void Polygon::draw(SimpleWindow *window) {
#ifdef X11_SUPPORT
void Polygon::draw(SimpleWindow *window) {