www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

segment.hh (501B)


      1 #ifndef _GEOMETRY_SEGMENT_HH_
      2 #define _GEOMETRY_SEGMENT_HH_
      3 
      4 #include "all_includes.hh"
      5 
      6 class Segment {
      7     public :
      8 	Vertex u;
      9 	Vertex v;
     10 
     11     public :
     12 	Segment(Vertex u, Vertex v);
     13 	float length();
     14 	float width();
     15 	float height();
     16 	Vertex center();
     17 	Vertex at(float);
     18 	Segment reduce(float value);
     19 	Vertex randomPos(int seed, int n, float a, float b); // Renvoie un vertex sur le segment [u,v], à une position entre a et b.
     20 	friend Segment operator+(const Segment& t, const Vertex& v);
     21 };
     22 
     23 #endif