vtdata library
Public Member Functions | Public Attributes | Protected Attributes
TLink Class Reference
Inheritance diagram for TLink:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 TLink (TLink &ref)
bool operator== (TLink &ref)
void SetNode (int n, TNode *pNode)
TNodeGetNode (int n)
double GetLinearCoordinates (const DPoint2 &p, double &a, double &b, DPoint2 &closest, int &linkpoint, float &fractional, bool bAllowEnds=true)
double DistanceToPoint (const DPoint2 &point, bool bAllowEnds=true)
bool IsLoop ()
virtual void SetFlag (int flag, bool value)
int GetFlag (int flag)
float Length ()
float EstimateWidth (bool bIncludeSidewalk=true)

Public Attributes

float m_fWidth
unsigned short m_iLanes
SurfaceType m_Surface
short m_iHwy
TLinkm_pNext
short m_iFlags
int m_id
float m_fSidewalkWidth
float m_fCurbHeight
float m_fMarginWidth
float m_fLaneWidth
float m_fParkingWidth

Protected Attributes

TNodem_pNode [2]
float m_fHeight [2]

Detailed Description

A Transportation Link a series of points, connecting one node to another.


Member Function Documentation

double TLink::DistanceToPoint ( const DPoint2 point,
bool  bAllowEnds = true 
)

Find closest lateral distance from a given point to the link.

double TLink::GetLinearCoordinates ( const DPoint2 p,
double &  result_a,
double &  result_b,
DPoint2 closest,
int &  linkpoint,
float &  fractional,
bool  bAllowEnds = true 
)

Produces the "linear coordinates" a and b, where a is the distance along the link, and b is the signed lateral distance orthogonal to the link at that point.

Parameters:
pThe input point.
result_aThe resulting distance along the link.
result_bThe signed lateral (or absolute) distance to the link.
closestThe closest point on the link.
linkpointIndex into the links points just before the closest point.
fractionalFractional distance between this link point and the next.
bAllowEndsIf true, then for cases where the the closest point is either end of the link, the distance to that point is returned. Otherwise, only laterial distances are returned.
 All Classes Files Functions Variables Enumerations Enumerator