Support Forum       G3D Web Page     
Public Member Functions | List of all members
G3D::_internal::PolyLineGeneric< SegmentType, VertexType > Class Template Reference

Public Member Functions

 PolyLineGeneric ()
 
 PolyLineGeneric (const Array< VertexType > &v, bool reverse=false)
 Set first == last to close. More...
 
bool closed () const
 
float distance (const VertexType &p, int &segmentIndex=dummyInt) const
 
More...
 
int numSegments () const
 
int numVertices () const
 Returns 1 + num segments; If the polyline is closed, the first and last vertex will be identical. More...
 
const SegmentType & segment (int s) const
 
VertexType vertex (int i) const
 

Constructor & Destructor Documentation

◆ PolyLineGeneric() [1/2]

template<class SegmentType , class VertexType >
G3D::_internal::PolyLineGeneric< SegmentType, VertexType >::PolyLineGeneric ( )
inline

◆ PolyLineGeneric() [2/2]

template<class SegmentType , class VertexType >
G3D::_internal::PolyLineGeneric< SegmentType, VertexType >::PolyLineGeneric ( const Array< VertexType > &  v,
bool  reverse = false 
)
inline

Set first == last to close.

Member Function Documentation

◆ closed()

template<class SegmentType , class VertexType >
bool G3D::_internal::PolyLineGeneric< SegmentType, VertexType >::closed ( ) const
inline

◆ distance()

template<class SegmentType , class VertexType >
float G3D::_internal::PolyLineGeneric< SegmentType, VertexType >::distance ( const VertexType &  p,
int &  segmentIndex = dummyInt 
) const
inline


Parameters
segmentIndexreturns the index of the closest segment.

◆ numSegments()

template<class SegmentType , class VertexType >
int G3D::_internal::PolyLineGeneric< SegmentType, VertexType >::numSegments ( ) const
inline

◆ numVertices()

template<class SegmentType , class VertexType >
int G3D::_internal::PolyLineGeneric< SegmentType, VertexType >::numVertices ( ) const
inline

Returns 1 + num segments; If the polyline is closed, the first and last vertex will be identical.

◆ segment()

template<class SegmentType , class VertexType >
const SegmentType& G3D::_internal::PolyLineGeneric< SegmentType, VertexType >::segment ( int  s) const
inline

◆ vertex()

template<class SegmentType , class VertexType >
VertexType G3D::_internal::PolyLineGeneric< SegmentType, VertexType >::vertex ( int  i) const
inline

documentation generated on Wed Nov 24 2021 08:02:03 using doxygen 1.8.15