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

The edge of a funnel. More...

#include <Funnel.h>

Public Member Functions

 FunnelEdge ()
 Default constructor. No initialization.
 
 FunnelEdge (size_t id, size_t end, const Vector2 &dir, const Vector2 &origin)
 Constructor. More...
 
bool isOnLeft (const Vector2 &dir) const
 Reports if the given direction is to the left of this edge. More...
 
bool isOnRight (const Vector2 &dir) const
 Reports if the given direction is to the right of this edge. More...
 
void set (size_t id, const Vector2 &dir)
 Sets the properties of the funnel edge. More...
 

Protected Attributes

size_t _id
 The identifier of the portal from which this wedge originates.
 
size_t _endID
 The identifier of the portal that ENDS the wedge.
 
Vector2 _origin
 The origin of the wedge.
 
Vector2 _dir
 The direction of this funnel edge.
 

Friends

class FunnelPlanner
 

Detailed Description

The edge of a funnel.

Constructor & Destructor Documentation

Menge::FunnelEdge::FunnelEdge ( size_t  id,
size_t  end,
const Vector2 dir,
const Vector2 origin 
)
inline

Constructor.

Parameters
idThe identifier of the portal from which this direction arises.
endThe identifier of the portal at which this wedge ends.
dirThe direction from the apex to the portal.
originThe origin of this funnel "wedge".

Member Function Documentation

bool Menge::FunnelEdge::isOnLeft ( const Vector2 dir) const
inline

Reports if the given direction is to the left of this edge.

Parameters
dirThe direction to test.
Returns
A boolean reporting if the direction is to the left of this edge (true) or to the right (false).
bool Menge::FunnelEdge::isOnRight ( const Vector2 dir) const
inline

Reports if the given direction is to the right of this edge.

Parameters
dirThe direction to test.
Returns
A boolean reporting if the direction is to the right of this edge (true) or to the left (false).
void Menge::FunnelEdge::set ( size_t  id,
const Vector2 dir 
)
inline

Sets the properties of the funnel edge.

Parameters
idThe id of the portal to which this funnel edge is associated.
dirThe direction of the edge.

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