Geometry Class Reference

#include <Geometry.h>


Static Public Member Functions

static double getLengthGeomSeries (double dFirst, double dRatio, double dSum)
static double getSumGeomSeries (double dFirst, double dRatio, double dLen)
static double getSumInfGeomSeries (double dFirst, double dRatio)
static double getFirstGeomSeries (double dSum, double dRatio, double dLen)
static double getFirstInfGeomSeries (double dSum, double dRatio)
static int abcFormula (double a, double b, double c, double *s1, double *s2)


Detailed Description

This class contains several static methods dealing with geometry.

Definition at line 213 of file Geometry.h.


Member Function Documentation

double Geometry::getLengthGeomSeries ( double  dFirst,
double  dRatio,
double  dSum 
) [static]

A geometric series is one in which there is a constant ratio between each element and the one preceding it. This method determines the length of a geometric series given its first element, the sum of the elements in the series and the constant ratio between the elements. Normally: s = a + ar + ar^2 + ... + ar^n Now: dSum = dFirst + dFirst*dRatio + dFirst*dRatio^2 + .. + dFist*dRatio^n

Parameters:
dFirst first term of the series
dRatio ratio with which the the first term is multiplied
dSum the total sum of all the serie
Returns:
the length(n in above example) of the series

Definition at line 1036 of file Geometry.cpp.

Referenced by WorldModel::getKickSpeedToTravel().

double Geometry::getSumGeomSeries ( double  dFirst,
double  dRatio,
double  dLength 
) [static]

A geometric series is one in which there is a constant ratio between each element and the one preceding it. This method determines the sum of a geometric series given its first element, the ratio and the number of steps in the series Normally: s = a + ar + ar^2 + ... + ar^n Now: dSum = dFirst + dFirst*dRatio + ... + dFirst*dRatio^dSteps

Parameters:
dFirst first term of the series
dRatio ratio with which the the first term is multiplied
dSum the number of steps to be taken into account
Returns:
the sum of the series

Definition at line 1060 of file Geometry.cpp.

Referenced by WorldModel::predictPosAfterNrCycles().

double Geometry::getSumInfGeomSeries ( double  dFirst,
double  dRatio 
) [static]

A geometric series is one in which there is a constant ratio between each element and the one preceding it. This method determines the sum of an infinite geometric series given its first element and the constant ratio between the elements. Note that such an infinite series will only converge when 0<r<1. Normally: s = a + ar + ar^2 + ar^3 + .... Now: dSum = dFirst + dFirst*dRatio + dFirst*dRatio^2...

Parameters:
dFirst first term of the series
dRatio ratio with which the the first term is multiplied
Returns:
the sum of the series

Definition at line 1077 of file Geometry.cpp.

Referenced by BasicPlayer::getActiveInterceptionPointBall(), BasicPlayer::getInterceptionPointBall(), and WorldModel::predictFinalAgentPos().

double Geometry::getFirstGeomSeries ( double  dSum,
double  dRatio,
double  dLength 
) [static]

A geometric series is one in which there is a constant ratio between each element and the one preceding it. This method determines the first element of a geometric series given its element, the ratio and the number of steps in the series Normally: s = a + ar + ar^2 + ... + ar^n Now: dSum = dFirst + dFirst*dRatio + ... + dFirst*dRatio^dSteps

Parameters:
dSum sum of the series
dRatio ratio with which the the first term is multiplied
dSum the number of steps to be taken into account
Returns:
the first element (a) of a serie

Definition at line 1096 of file Geometry.cpp.

Referenced by WorldModel::getFirstSpeedFromDist().

double Geometry::getFirstInfGeomSeries ( double  dSum,
double  dRatio 
) [static]

A geometric series is one in which there is a constant ratio between each element and the one preceding it. This method determines the first element of an infinite geometric series given its first element and the constant ratio between the elements. Note that such an infinite series will only converge when 0<r<1. Normally: s = a + ar + ar^2 + ar^3 + .... Now: dSum = dFirst + dFirst*dRatio + dFirst*dRatio^2...

Parameters:
dSum sum of the series
dRatio ratio with which the the first term is multiplied
Returns:
the first term of the series

Definition at line 1113 of file Geometry.cpp.

Referenced by WorldModel::getKickSpeedToTravel().

int Geometry::abcFormula ( double  a,
double  b,
double  c,
double *  s1,
double *  s2 
) [static]

This method performs the abc formula (Pythagoras' Theorem) on the given parameters and puts the result in *s1 en *s2. It returns the number of found coordinates.

Parameters:
a a parameter in abc formula
b b parameter in abc formula
c c parameter in abc formula
*s1 first result of abc formula
*s2 second result of abc formula
Returns:
number of found x-coordinates

Definition at line 1131 of file Geometry.cpp.

References EPSILON.

Referenced by Line::getCircleIntersectionPoints().


The documentation for this class was generated from the following files:
Generated on Thu Apr 26 22:45:31 2007 for GangOfSix(GOS)-RoboCupTeamProject by  doxygen 1.5.1-p1