|
vtdata library
|

Public Member Functions | |
| TLink (TLink &ref) | |
| bool | operator== (TLink &ref) |
| void | SetNode (int n, TNode *pNode) |
| TNode * | GetNode (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 |
| TLink * | m_pNext |
| short | m_iFlags |
| int | m_id |
| float | m_fSidewalkWidth |
| float | m_fCurbHeight |
| float | m_fMarginWidth |
| float | m_fLaneWidth |
| float | m_fParkingWidth |
Protected Attributes | |
| TNode * | m_pNode [2] |
| float | m_fHeight [2] |
A Transportation Link a series of points, connecting one node to another.
| 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.
| p | The input point. |
| result_a | The resulting distance along the link. |
| result_b | The signed lateral (or absolute) distance to the link. |
| closest | The closest point on the link. |
| linkpoint | Index into the links points just before the closest point. |
| fractional | Fractional distance between this link point and the next. |
| bAllowEnds | If 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. |
1.7.4