|
Enki
1.9
|
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... | |
| class | Enki::FastRandom |
| A fast random generator. More... | |
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 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.bourquin@epfl.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... | |
| double | Enki::uniformRand (void) |
| Return a number in [0;1[ in a uniform distribution. More... | |
| unsigned | Enki::intRand (unsigned max) |
| Return a number between [0;max[ in integer in a uniform distribution. More... | |
| bool | Enki::boolRand (double prob=0.5) |
| Return true with a probability prob. If no argument is given, prob = 0.5. More... | |
| double | Enki::gaussianRand (double mean, double sigm) |
| Return a random number with a gaussian distribution of a certain mean and standard deviation. More... | |
This includes the Color type, a collection of several random distributions and some geometric primitives.
| typedef Vector Enki::Point |
A point in a 2D space, another name for a vector.
|
inline |
Return true with a probability prob. If no argument is given, prob = 0.5.
References Enki::uniformRand().
|
inline |
Return a random number with a gaussian distribution of a certain mean and standard deviation.
References Enki::uniformRand().
Referenced by Enki::IRSensor::finalize(), Enki::GroundSensor::init(), and Enki::ActiveSoundSource::realisticSetSound().
get the intersection point between two line segments returns Point(HUGE_VAL, HUGE_VAL) if there's no intersection added by yvan.bourquin@epfl.ch
References Enki::Segment::a, Enki::Segment::b, Enki::Vector::x, and Enki::Vector::y.
Returns 2 times the signed triangle area.
positive if abc winds counter-clockwise, negative if abc winds clockwise, zero if abc is degenerate. See: Real-time collision detection, C. Ericson, Page 152
References Enki::Vector::x, and Enki::Vector::y.
Referenced by Enki::getTriangleHeight(), and Enki::World::isPointInside().
Returns signed height of triangle abc with base ab.
positive if abc winds counter-clockwise negative if abc winds clockwise, zero if abc is degenerate.
References Enki::getTriangleAreaTwice(), and Enki::Vector::norm().
Referenced by Enki::World::isPointInside().
|
inline |
Return a number between [0;max[ in integer in a uniform distribution.
|
inline |
Normlize an angle to be between -PI and +PI.
References Enki::Vector::angle(), Enki::Vector::x, and Enki::Vector::y.
Referenced by Enki::PhysicalObject::finalizePhysicsInteractions(), and Enki::CircularCam::objectStep().
| std::ostream & Enki::operator<< | ( | std::ostream & | outs, |
| const Polygone & | polygone | ||
| ) |
Print a polygone to a stream.
|
inline |
Return a number in [0;1[ in a uniform distribution.
Referenced by Enki::boolRand(), Enki::gaussianRand(), and Enki::UniformRand::operator()().
1.8.11