Added random color generation to the polygons, also made so that the
color of the vector indicating speed is the same as the color of the polygon, but a little lighter
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#ifndef POLYGONS_H_INCLUDED
|
||||
#define POLYGONS_H_INCLUDED
|
||||
|
||||
#include "color.h"
|
||||
#include "vec2d.h"
|
||||
|
||||
#include <cmath>
|
||||
@ -22,6 +23,7 @@ class polygon {
|
||||
double mass;
|
||||
std::string label;
|
||||
|
||||
color_t color;
|
||||
std::vector<vec2d> global_points = points;
|
||||
|
||||
vec2d speed;
|
||||
@ -118,6 +120,8 @@ class polygon {
|
||||
extern polygon* polygons;
|
||||
extern uint n_polygons;
|
||||
|
||||
extern bool draw_speed;
|
||||
|
||||
extern void polygons_init_state();
|
||||
extern void polygons_update_state();
|
||||
extern void polygons_draw(cairo_t* cr);
|
||||
|
Reference in New Issue
Block a user