Functions
Utils Namespace Reference

The set of utility functions. More...

Functions

template<typename T >
bool Less (std::pair< float, T > a, std::pair< float, T > b)
 Comparison function for pairs of the form <float, T> For sorting purposes. More...
 
bool linearProgram1 (const std::vector< Line > &lines, unsigned long curr, float radius, const Vector &optVelocity, bool directionOpt, Vector &result)
 Solves a one-dimensional linear program on a specified line subject to linear constraints defined by lines and a circular constraint. More...
 
unsigned long int linearProgram2 (const std::vector< Line > &lines, float radius, const Vector &optVelocity, bool directionOpt, Vector &result)
 Solves a two-dimensional linear program subject to linear constraints defined by lines and a circular constraint. More...
 
void linearProgram3 (const std::vector< Line > &lines, size_t numObstLines, size_t beginLine, float radius, Vector &result)
 Solves a two-dimensional linear program subject to linear constraints defined by lines and a circular constraint. More...
 
template<typename T >
bool More (std::pair< float, T > a, std::pair< float, T > b)
 Comparison function for pairs of the form <float, T> For sorting purposes. More...
 
float SqPointSegDistance (Point L1, Point L2, Point P)
 Computes squared euclidean distance from point to line segment. More...
 

Detailed Description

The set of utility functions.

Function Documentation

template<typename T >
bool Utils::Less ( std::pair< float, T >  a,
std::pair< float, T >  b 
)

Comparison function for pairs of the form <float, T> For sorting purposes.

Parameters
aFirst operand.
bSecond operand
Returns
Is a less than b

Definition at line 404 of file Geom.h.

bool Utils::linearProgram1 ( const std::vector< Line > &  lines,
unsigned long  curr,
float  radius,
const Vector optVelocity,
bool  directionOpt,
Vector result 
)

Solves a one-dimensional linear program on a specified line subject to linear constraints defined by lines and a circular constraint.

Parameters
linesLines defining the linear constraints.
currThe specified line constraint.
radiusThe radius of the circular constraint.
optVelocityThe optimization velocity.
directionOptTrue if the direction should be optimized.
resultA reference to the result of the linear program.
Returns
True if successful.
Author
https://github.com/snape/RVO2

Definition at line 88 of file Geom.cpp.

unsigned long int Utils::linearProgram2 ( const std::vector< Line > &  lines,
float  radius,
const Vector optVelocity,
bool  directionOpt,
Vector result 
)

Solves a two-dimensional linear program subject to linear constraints defined by lines and a circular constraint.

Parameters
linesLines defining the linear constraints.
radiusThe radius of the circular constraint.
optVelocityThe optimization velocity.
directionOptTrue if the direction should be optimized.
resultA reference to the result of the linear program.
Returns
The number of the line it fails on, and the number of lines if successful.
Author
https://github.com/snape/RVO2

Definition at line 179 of file Geom.cpp.

void Utils::linearProgram3 ( const std::vector< Line > &  lines,
size_t  numObstLines,
size_t  beginLine,
float  radius,
Vector result 
)

Solves a two-dimensional linear program subject to linear constraints defined by lines and a circular constraint.

Parameters
linesLines defining the linear constraints.
numObstLinesCount of obstacle lines.
beginLineThe line on which the 2-d linear program failed.
radiusThe radius of the circular constraint.
resultA reference to the result of the linear program.
Author
https://github.com/snape/RVO2

Definition at line 214 of file Geom.cpp.

template<typename T >
bool Utils::More ( std::pair< float, T >  a,
std::pair< float, T >  b 
)

Comparison function for pairs of the form <float, T> For sorting purposes.

Parameters
aFirst operand.
bSecond operand
Returns
Is a more than b

Definition at line 392 of file Geom.h.

float Utils::SqPointSegDistance ( Point  L1,
Point  L2,
Point  P 
)

Computes squared euclidean distance from point to line segment.

Parameters
L1First point of line segment.
L2Last point of line segment
PPoint,for which the distance is computed
Returns
Squared euclidean distance from point P to line segment (L1-L2).
Author
https://github.com/snape/RVO2

Definition at line 68 of file Geom.cpp.



ORCAStar
Author(s): Stepan Drgachev
autogenerated on Wed Jul 15 2020 16:13:14