2011-m2s3-city-builder/segment.hh
Yoann 7b7575d120 Ajout d'une fonction de reduction d'un segment, et d'une fonction
permettant d'extraire un parallélogramme à partir d'un quadrilatère.
2011-12-21 10:31:43 +01:00

21 lines
375 B
C++

#ifndef _SEGMENT_HH_
#define _SEGMENT_HH_
#include "all_includes.hh"
class Segment {
public :
Vertex u;
Vertex v;
public :
Segment(Vertex u, Vertex v);
int length();
int width();
int height();
Segment reduce(int value);
Vertex randomPos(int seed, int n, int a, int b); // Renvoir un vertex sur le segment [u,v], à une position entre a% and b%.
};
#endif