Public Member Functions | |
FLine2 (int size) | |
FLine2 (const FLine2 &ref) | |
FLine2 & | operator= (const FLine2 &v) |
FLine2 & | operator= (const DLine2 &v) |
float | Area () const |
float | SegmentLength (uint i) const |
void | NearestPoint (const FPoint2 &Point, int &iIndex, float &dist) const |
void | NearestPoint (const FPoint2 &Point, int &iIndex) const |
bool | NearestSegment (const FPoint2 &Point, int &iIndex, float &dist, FPoint2 &Intersection) const |
void | InsertPointAfter (int iInsertAfter, const FPoint2 &Point) |
void | ReverseOrder () |
bool | IsConvex () const |
![]() | |
vtArray (uint size=0) | |
vtArray (const vtArray< FPoint2 > &) | |
uint | GetSize () const |
uint | GetMaxSize () const |
bool | SetSize (uint) |
bool | SetMaxSize (uint) |
uint | GetElemSize () const |
FPoint2 * | GetData () const |
void | FreeData () |
bool | IsEmpty () const |
FPoint2 & | GetAt (uint i) const |
bool | SetAt (uint i, FPoint2) |
vtArray< FPoint2 > & | operator= (const vtArray< FPoint2 > &) |
FPoint2 & | operator[] (uint i) |
const FPoint2 & | operator[] (uint i) const |
void | Clear () |
bool | RemoveAt (uint i, int n=1) |
int | Append (const FPoint2 &) |
int | Append (const vtArray< FPoint2 > &) |
int | Find (const FPoint2 &) const |
Additional Inherited Members | |
![]() | |
virtual bool | Grow (uint) |
virtual void | DestructItems (uint first, uint last) |
![]() | |
uint | m_Size |
uint | m_MaxSize |
FPoint2 * | m_Data |
A series of 2D points. This is useful for representing either a series of points, line segments or a closed polygon. Single-precision.
void FLine2::NearestPoint | ( | const FPoint2 & | Point, |
int & | iIndex, | ||
float & | fClosest | ||
) | const |
Return the nearest 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. |
fClosest | Distance from the FLine2 to the input point. |
void FLine2::NearestPoint | ( | const FPoint2 & | Point, |
int & | iIndex | ||
) | const |
A slightly faster version of NearestPoint which doesn't provide the distance to the closest point.