Enki  1.9
Classes | Namespaces | Typedefs | Functions
Geometry.h File Reference

The mathematic classes for 2D geometry. More...

#include <cmath>
#include <vector>
#include <limits>
#include <ostream>
#include <algorithm>

Go to the source code of this file.

Classes

struct  Enki::Vector
 A vector in a 2D space. More...
 
struct  Enki::Matrix22
 A 2x2 matrix. More...
 
struct  Enki::Segment
 A segment in a 2D space, basically two points. More...
 
struct  Enki::Polygone
 Polygone, which is a vector of points. Anti-clockwise, standard trigonometric orientation. More...
 

Namespaces

 Enki
 Enki is the namespace of the Enki simulator. All Enki functions and classes excepted the math one are inside this namespace.
 

Typedefs

typedef Vector Enki::Point
 A point in a 2D space, another name for a vector. More...
 

Functions

std::ostream & Enki::operator<< (std::ostream &outs, const Vector &vector)
 Print a vector to a stream.
 
std::ostream & Enki::operator<< (std::ostream &outs, const Polygone &polygone)
 Print a polygone to a stream. More...
 
double Enki::normalizeAngle (double angle)
 Normlize an angle to be between -PI and +PI. More...
 
Point Enki::getIntersection (const Segment &s1, const Segment &s2)
 get the intersection point between two line segments returns Point(HUGE_VAL, HUGE_VAL) if there's no intersection added by yvan..nosp@m.bour.nosp@m.quin@.nosp@m.epfl.nosp@m..ch More...
 
double Enki::getTriangleAreaTwice (const Point &a, const Point &b, const Point &c)
 Returns 2 times the signed triangle area. More...
 
double Enki::getTriangleHeight (const Point &a, const Point &b, const Point &c)
 Returns signed height of triangle abc with base ab. More...
 

Detailed Description

The mathematic classes for 2D geometry.