vtdata library
|
Public Member Functions | |
DLine3 (const DLine3 &ref) | |
DLine3 & | operator= (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 |
Public Member Functions inherited from vtArray< DPoint3 > | |
vtArray (uint size=0) | |
vtArray (const vtArray< DPoint3 > &) | |
uint | GetSize () const |
uint | GetMaxSize () const |
bool | SetSize (uint) |
bool | SetMaxSize (uint) |
uint | GetElemSize () const |
DPoint3 * | GetData () const |
void | FreeData () |
bool | IsEmpty () const |
DPoint3 & | GetAt (uint i) const |
bool | SetAt (uint i, DPoint3) |
vtArray< DPoint3 > & | operator= (const vtArray< DPoint3 > &) |
DPoint3 & | operator[] (uint i) |
const DPoint3 & | operator[] (uint i) const |
void | Clear () |
bool | RemoveAt (uint i, int n=1) |
int | Append (const DPoint3 &) |
int | Append (const vtArray< DPoint3 > &) |
int | Find (const DPoint3 &) const |
Additional Inherited Members | |
Protected Member Functions inherited from vtArray< DPoint3 > | |
virtual bool | Grow (uint) |
virtual void | DestructItems (uint first, uint last) |
Protected Attributes inherited from vtArray< DPoint3 > | |
uint | m_Size |
uint | m_MaxSize |
DPoint3 * | m_Data |
A series of 3D points. This is useful for representing either a series of points, line segments or a closed polygon. Double-precision.
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.
Point | The input point. |
iIndex | Index of the first point of the nearest line segment. |
dClosest | Distance 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.
Point | The input point. |
iIndex | Index of the first point of the nearest line segment. |
dist | Distance from the DLine2 to the input point. |
Intersection | The closest point on the DLine2. |