#include "PfieldDatatypes.h"
#include "PotentialFunctions.h"
Include dependency graph for PfieldGeometry.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Classes | |
class | PfieldGeometricObject |
Abstract base class for geometric objects used by potentialfields. More... | |
class | Polygon |
A class representing a convex polygon. More... | |
class | Line |
A class representing a line. More... | |
class | Circle |
A class representing a circle. More... | |
class | NoGeometry |
A class representing an empty geometric object. More... | |
class | Sector |
A class representing a sector. More... | |
Enumerations | |
enum | GeometryType { POLYGON, LINE, CIRCLE, NONE } |
Definition of the different types of geometric objects. More... | |
Functions | |
bool | pointPerpendicularToLine (const PfVec &l1, const PfVec &l2, const PfVec &p, double &distance, PfVec &perpendicularPoint) |
Determines if a point is perpendicular to a line. | |
void | reduceToConvexHullByWrapping (Polygon &p) |
Reduces the points of a polygon to its convex hull. | |
void | intersectGeometricObjects (PfieldGeometricObject *g1, PfieldGeometricObject *g2, std::vector< PfVec > &intersections) |
Intersects two geometric objects and returns the intersection points as well as significant points of the second object inside the intersection. | |
void | intersectLineAndLine (const Line &l1, const Line &l2, std::vector< PfVec > &intersections) |
Intersects a line with another line (basic intersection checking has to be done before). | |
void | intersectLineAndCircle (const Line &line, const Circle &circle, std::vector< PfVec > &intersections) |
Intersects a line with a circle (basic intersection checking has to be done before). | |
void | intersectPolygonAndCircle (const Polygon &polygon, const Circle &circle, std::vector< PfVec > &intersections) |
Intersects a polygon with a circle (basic intersection checking has to be done before). | |
void | intersectCircleAndCircle (const Circle &circle1, const Circle &circle2, std::vector< PfVec > &intersections) |
Intersects a circle with a circle (basic intersection checking has to be done before). |
Definition in file PfieldGeometry.h.
|
Definition of the different types of geometric objects.
Definition at line 23 of file PfieldGeometry.h. Referenced by NoGeometry::getType(), Circle::getType(), Line::getType(), and Polygon::getType(). |
|
Determines if a point is perpendicular to a line.
Definition at line 14 of file PfieldGeometry.cpp. References PfVec::distanceTo(), EPSILON, PfVec::scalarProduct(), PfVec::x, and PfVec::y. Referenced by Polygon::distanceTo(), and Line::distanceTo(). |
Here is the call graph for this function:
|
Reduces the points of a polygon to its convex hull.
Definition at line 61 of file PfieldGeometry.cpp. References pi2, Polygon::pts, and theta(). Referenced by AmongFormation::updateGeometry(), and BetweenFormation::updateGeometry(). |
Here is the call graph for this function:
|
Intersects two geometric objects and returns the intersection points as well as significant points of the second object inside the intersection.
Definition at line 297 of file PfieldGeometry.cpp. References CIRCLE, PfieldGeometricObject::getType(), PfieldGeometricObject::intersectable, intersectCircleAndCircle(), intersectLineAndCircle(), intersectLineAndLine(), intersectLineAndPolygon(), intersectPolygonAndCircle(), PfVec::length(), LINE, POLYGON, PfieldGeometricObject::position, and PfieldGeometricObject::radiusOfCollisionCircle. Referenced by FutureWorldModelGenerator::getMaxRotationForObject(), and FutureWorldModelGenerator::getMaxTranslationForObject(). |
Here is the call graph for this function:
|
Intersects a line with another line (basic intersection checking has to be done before).
Definition at line 139 of file PfieldGeometry.cpp. References Line::p1, Line::p2, testIntersection(), PfVec::x, and PfVec::y. Referenced by intersectGeometricObjects(), and intersectLineAndPolygon(). |
Here is the call graph for this function:
|
Intersects a line with a circle (basic intersection checking has to be done before).
Definition at line 175 of file PfieldGeometry.cpp. References Line::p1, Line::p2, PfieldGeometricObject::position, PfieldGeometricObject::radiusOfCollisionCircle, and PfVec::scalarProduct(). Referenced by intersectGeometricObjects(), and intersectPolygonAndCircle(). |
Here is the call graph for this function:
|
Intersects a polygon with a circle (basic intersection checking has to be done before).
Definition at line 215 of file PfieldGeometry.cpp. References intersectLineAndCircle(), Line::p1, Line::p2, and Polygon::pts. Referenced by intersectGeometricObjects(). |
Here is the call graph for this function:
|
Intersects a circle with a circle (basic intersection checking has to be done before).
Definition at line 229 of file PfieldGeometry.cpp. References EPSILON, pi, PfieldGeometricObject::position, Circle::radius, PfVec::x, and PfVec::y. Referenced by intersectGeometricObjects(). |