All Classes Namespaces Files Functions Variables Typedefs Pages
Classes | Typedefs | Functions
TTC Namespace Reference

The namespace of the library. To make sure that all functions in the library are not conflicting with any other function the library uses it's own namespace. One always needs to use this namespace to access the functions inside this library. More...

Classes

class  Agent
 Simulates the anticipatory behavior of an agent. More...
 
struct  AgentInitialParameters
 The initial parameters for a single agent. More...
 
class  LineObstacle
 A line segment obstacle class. More...
 
class  ProximityDatabaseItem
 The virtual interface used by objects in the spatial database. More...
 
class  SimulationEngine
 The main class of the library. More...
 
class  Vector2D
 A two-dimensional vector class. More...
 

Typedefs

typedef LQProximityDatabase2D SpatialProximityDatabase
 The spatial proximity database.
 
typedef
SpatialProximityDatabase::tokenType 
ProximityToken
 An object in the proximity database.
 
typedef ProximityDatabaseItemProximityDatabaseItemPtr
 Pointer to a ProximityDatabaseItem.
 

Functions

float Sqr (float a)
 The square of a value. More...
 
Vector2D closestPointLineSegment (const Vector2D &line_start, const Vector2D &line_end, const Vector2D &p)
 Determine the closest point on a line segment given a test point. More...
 
std::ostream & operator<< (std::ostream &os, const Vector2D &v)
 Writes a vector to an output stream. More...
 
Vector2D normalize (const Vector2D &v)
 Normalization of a vector. More...
 
float dot (const Vector2D &v1, const Vector2D &v2)
 The dot product between two vectors. More...
 
float det (const Vector2D &v1, const Vector2D &v2)
 The cross product between two vectors. More...
 
Vector2D operator* (const float a, const Vector2D &v)
 Scalar multiplication (left operator) More...
 
void clamp (Vector2D &v, float maxValue)
 Caps the magnitude of a vector to a maximum value. More...
 

Detailed Description

The namespace of the library. To make sure that all functions in the library are not conflicting with any other function the library uses it's own namespace. One always needs to use this namespace to access the functions inside this library.

Function Documentation

void TTC::clamp ( Vector2D &  v,
float  maxValue 
)
inline

Caps the magnitude of a vector to a maximum value.

Parameters
forceA force vector
maxValueThe maximum magnitude of the force.
Vector2D TTC::closestPointLineSegment ( const Vector2D &  line_start,
const Vector2D &  line_end,
const Vector2D &  p 
)
inline

Determine the closest point on a line segment given a test point.

Parameters
line_startThe start point of the line segment.
line_endThe end point of the line segment.
pThe test point.
Returns
The closest point on the line segment.
float TTC::det ( const Vector2D &  v1,
const Vector2D &  v2 
)
inline

The cross product between two vectors.

Parameters
v1A vector
v2A vector
Returns
Returns the cross product between the two vectors i.e determinant of the 2x2 matrix formed by using v1 as the first row and v2 as the second row.
float TTC::dot ( const Vector2D &  v1,
const Vector2D &  v2 
)
inline

The dot product between two vectors.

Parameters
v1A vector
v2A vector
Returns
Returns the dot product between the two vectors
Vector2D TTC::normalize ( const Vector2D &  v)
inline

Normalization of a vector.

Parameters
vA vector
Returns
The normalized vector.
Vector2D TTC::operator* ( const float  a,
const Vector2D &  v 
)
inline

Scalar multiplication (left operator)

Parameters
vA vector.
aThe scalar.
std::ostream& TTC::operator<< ( std::ostream &  os,
const Vector2D &  v 
)
inline

Writes a vector to an output stream.

Parameters
osThe output stream
vThe vector
Returns
The output stream.
float TTC::Sqr ( float  a)
inline

The square of a value.

Parameters
aA scalar value
Returns
Returns the square of the scalar.