Modular Pedestrian Simulation Framework for Research and Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
Menge::Math::Line Class Reference

Defines a directed line. More...

#include <Line.h>

Public Member Functions

 Line ()
 Default constructor.
 Line (const Vector2 &p, const Vector2 &d)
 Explicit constructor. More...
Vector2 nearestPt (const Vector2 &p) const
 Returns the nearest point on the line to p. More...

Public Attributes

Vector2 _point
 A point on the directed line.
Vector2 _direction
 The direction of the directed line.

Detailed Description

Defines a directed line.

Constructor & Destructor Documentation

Menge::Math::Line::Line ( const Vector2 p,
const Vector2 d 

Explicit constructor.

pA point on the line.
dA unit-length vector defining the direction of the line. the line is defined by p + dt, where t in the range [-infinity, infinity].

Member Function Documentation

Vector2 Menge::Math::Line::nearestPt ( const Vector2 p) const

Returns the nearest point on the line to p.

pThe point to which we want to find the nearest point.
A point on the line that is closest to p.

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