vtdata library
Public Member Functions | List of all members
FLine2 Class Reference
Inheritance diagram for FLine2:
Inheritance graph
[legend]

Public Member Functions

 FLine2 (int size)
 
 FLine2 (const FLine2 &ref)
 
FLine2operator= (const FLine2 &v)
 
FLine2operator= (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
 
- Public Member Functions inherited from vtArray< FPoint2 >
 vtArray (uint size=0)
 
 vtArray (const vtArray< FPoint2 > &)
 
uint GetSize () const
 
uint GetMaxSize () const
 
bool SetSize (uint)
 
bool SetMaxSize (uint)
 
uint GetElemSize () const
 
FPoint2GetData () const
 
void FreeData ()
 
bool IsEmpty () const
 
FPoint2GetAt (uint i) const
 
bool SetAt (uint i, FPoint2)
 
vtArray< FPoint2 > & operator= (const vtArray< FPoint2 > &)
 
FPoint2operator[] (uint i)
 
const FPoint2operator[] (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

- Protected Member Functions inherited from vtArray< FPoint2 >
virtual bool Grow (uint)
 
virtual void DestructItems (uint first, uint last)
 
- Protected Attributes inherited from vtArray< FPoint2 >
uint m_Size
 
uint m_MaxSize
 
FPoint2m_Data
 

Detailed Description

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

Member Function Documentation

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.

Parameters
PointThe input point.
iIndexIndex of the first point of the nearest line segment.
fClosestDistance 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.