vtdata library
Public Member Functions
DLine3 Class Reference
Inheritance diagram for DLine3:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DLine3 (const DLine3 &ref)
DLine3operator= (const DLine3 &v)
void Add (const DPoint2 &p)
bool NearestSegment2D (const DPoint2 &Point, int &iIndex, double &dist, DPoint3 &Intersection) const
void NearestPoint2D (const DPoint2 &Point, int &iIndex, double &dist) const
bool ContainsPoint2D (const DPoint2 &p) const

Detailed Description

A series of 3D points. This is useful for representing either a series of points, line segments or a closed polygon. Double-precision.


Member Function Documentation

bool DLine3::ContainsPoint2D ( const DPoint2 p) const

With the assumption that this set of points defines a closed polygon, test whether the polygon contains a given point. Since a simple array of points being interpreted as a polygon, this means the data may be concave or convex, but not contains holes. The third (Z) coordinate is ignored.

void DLine3::NearestPoint2D ( const DPoint2 Point,
int &  iIndex,
double &  dClosest 
) const

Return the nearest (2D distance) point (of the points which make up the line). This is not the same as the closest place on the line, which may lie between the defining points.

Parameters:
PointThe input point.
iIndexIndex of the first point of the nearest line segment.
dClosestDistance from the DLine2 to the input point.
bool DLine3::NearestSegment2D ( const DPoint2 Point,
int &  iIndex,
double &  dist,
DPoint3 Intersection 
) const

Returns the location of the horizontally closest point on the line to a given 2D point.

Parameters:
PointThe input point.
iIndexIndex of the first point of the nearest line segment.
distDistance from the DLine2 to the input point.
IntersectionThe closest point on the DLine2.
Returns:
True if a closest point was found.
 All Classes Files Functions Variables Enumerations Enumerator