Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# PfieldGeometricObject Class Reference

Abstract base class for geometric objects used by potentialfields. More...

`#include <PfieldGeometry.h>`

Inheritance diagram for PfieldGeometricObject:

[legend]
Collaboration diagram for PfieldGeometricObject:

[legend]
List of all members.

## Public Member Functions
virtual | ~PfieldGeometricObject ()
| Virtual destructor.
virtual GeometryType | getType () const=0
| Returns the type of a geometric object.
virtual PfieldGeometricObject * | clone () const=0
| Clones a geometric object.
virtual double | distanceTo (const PfPose &base, const PfVec &pos, PfVec &contact) const=0
| Computes the distance from the border of the object to a given point.
virtual void | initRadiusOfCollisionCircle ()=0
| Computes value of the radiusOfCollisionCircle variable.
double | getRadiusOfCollisionCircle () const
| Returns the value of radiusOfCollisionCircle.
PfVec | getPosition () const
| Returns the position.
virtual PfieldGeometricObject * | getAbs (const PfPose &base) const=0
| Returns a geometric object with absolute coordinates.
virtual void | getPoints (std::vector< PfVec > &points)
| Returns all points of the object.
virtual void | setAbsoluteFromOther (const PfPose &base, PfieldGeometricObject *other)=0
| Computes absolute coordinates from a base pose and another, relative polygon.
## Public Attributes
double | radiusOfCollisionCircle
| The radius of a circle around the whole object.
bool | intersectable
| Flag, true if object is intersectable by other objects.
PfVec | position
| The position of the object, only used with absolute positions.

## Detailed Description

Abstract base class for geometric objects used by potentialfields.

Definition at line 96 of file PfieldGeometry.h.

## Constructor & Destructor Documentation

virtual PfieldGeometricObject::~PfieldGeometricObject | ( |  | ) | `[inline, virtual]`

| Virtual destructor. Definition at line 107 of file PfieldGeometry.h.

## Member Function Documentation

virtual GeometryType PfieldGeometricObject::getType | ( |  | ) | const`[pure virtual]`

| Returns the type of a geometric object. Returns: The type Implemented in Polygon, Line, Circle, and NoGeometry. Referenced by intersectGeometricObjects().

virtual PfieldGeometricObject* PfieldGeometricObject::clone | ( |  | ) | const`[pure virtual]`

| Clones a geometric object. Returns: A pointer to a copy of the object Implemented in Polygon, Line, Circle, and NoGeometry. Referenced by PotentialFieldsObject::setGeometry().

virtual double PfieldGeometricObject::distanceTo | ( | const PfPose & | base,
|  | const PfVec & | pos,
|  | PfVec & | contact
| ) | const`[pure virtual]`

  | Computes the distance from the border of the object to a given point. Parameters:
  base | The pose of the object to which the geometric object is assigned
  pos | The tested point
  contact | Returns the next position of the geometric object to the point
Returns: The distance Implemented in Polygon, Line, Circle, and NoGeometry. Referenced by computeChargeForShapefield(), computeGradientForShapefield(), and SingleFormation::getDistanceToFormation().

virtual void PfieldGeometricObject::initRadiusOfCollisionCircle | ( |  | ) | `[pure virtual]`

| Computes value of the radiusOfCollisionCircle variable. Implemented in Polygon, Line, Circle, and NoGeometry.

double PfieldGeometricObject::getRadiusOfCollisionCircle | ( |  | ) | const`[inline]`

| Returns the value of radiusOfCollisionCircle. Returns: The radius Definition at line 133 of file PfieldGeometry.h. References radiusOfCollisionCircle.

PfVec PfieldGeometricObject::getPosition | ( |  | ) | const`[inline]`

| Returns the position. Returns: The position Definition at line 139 of file PfieldGeometry.h.

virtual PfieldGeometricObject* PfieldGeometricObject::getAbs | ( | const PfPose & | base | ) | const`[pure virtual]`

  | Returns a geometric object with absolute coordinates. Parameters:
  base | The pose of the object
Returns: A pointer to a new geometric object Implemented in Polygon, Line, Circle, and NoGeometry. Referenced by PotentialFieldsObject::setGeometry().

virtual void PfieldGeometricObject::getPoints | ( | std::vector< PfVec > & | points | ) | `[inline, virtual]`

  | Returns all points of the object. Parameters:
  points | The list of points to which the object's points will be attached
Reimplemented in Polygon, Line, and Circle. Definition at line 151 of file PfieldGeometry.h.

virtual void PfieldGeometricObject::setAbsoluteFromOther | ( | const PfPose & | base,
|  | PfieldGeometricObject * | other
| ) | `[pure virtual]`

  | Computes absolute coordinates from a base pose and another, relative polygon. Use careful! The other object has to be the same type and the size! Only positions are changed, other members will be ignored! Parameters:
  base | The new absolute position
  other | A relative geometric object
Implemented in Polygon, Line, Circle, and NoGeometry. Referenced by PotentialFieldsObject::computeAbsGeometry(), and PotentialFieldsObject::setPose().

## Member Data Documentation

double PfieldGeometricObject::radiusOfCollisionCircle

| The radius of a circle around the whole object. Definition at line 100 of file PfieldGeometry.h. Referenced by NoGeometry::clone(), Polygon::clone(), Line::clone(), Circle::clone(), FutureWorldModelGenerator::getMaxTranslationForObject(), getRadiusOfCollisionCircle(), intersectGeometricObjects(), and intersectLineAndCircle().

bool PfieldGeometricObject::intersectable

| Flag, true if object is intersectable by other objects. Definition at line 102 of file PfieldGeometry.h. Referenced by NoGeometry::clone(), Polygon::clone(), Line::clone(), Circle::clone(), intersectGeometricObjects(), and Parser::parseGeometricObject().

PfVec PfieldGeometricObject::position

| The position of the object, only used with absolute positions. Definition at line 104 of file PfieldGeometry.h. Referenced by NoGeometry::clone(), Polygon::clone(), Line::clone(), Circle::clone(), NoGeometry::getAbs(), Circle::getAbs(), FutureWorldModelGenerator::getMaxRotationForObject(), FutureWorldModelGenerator::getMaxTranslationForObject(), intersectCircleAndCircle(), intersectGeometricObjects(), and intersectLineAndCircle().

The documentation for this class was generated from the following file:

- Tools/PotentialFields/PfieldGeometry.h