iso::geom::PolyLine Class Reference

#include <iso_geom_poly_line.h>

Inherits iso::geom::Geometry.

Inheritance diagram for iso::geom::PolyLine:

Inheritance graph
[legend]
Collaboration diagram for iso::geom::PolyLine:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PolyLine ()
 default constructor
 PolyLine (unsigned int pDim)
 create polyline
 PolyLine (const QVector< math::Vector< real > > &pPoints)
 copy constructor
 PolyLine (unsigned int pDim, unsigned int pPointCount, const real *pPoints)
 copy constructor
 PolyLine (const PolyLine &pPolyLine)
 copy constructor
 ~PolyLine ()
 destructor
bool closed () const
void setClosed (bool pClosed)
virtual void calcMinMaxPos ()
 calculate minimum and maximum positions
unsigned int pointCount () const
 return number of points
const QVector< math::Vector<
real > > & 
points () const
 return points
QVector< math::Vector< real > > & points ()
 return points
const math::Vector< real > & point (unsigned int pIndex) const
 return point
math::Vector< real > & point (unsigned int pIndex)
 return point
void append (const math::Vector< float > &pPoint)
void clear ()
 remove all points from polyline
void append (const PolyLine &pPolyLine)
 append polyline at end of polyline
void replace (int pPointCount, const real *pPoints)
 replace polyline
void replace (unsigned int pIndex, const math::Vector< float > &pPoint)
 replace point in polyline
void replace (unsigned int pIndex, const PolyLine &pPolyLine)
 replace polyline with polyline
const PolyLineoperator= (const PolyLine &pPolyLine)
 assigment operator
math::Vector< real > & operator[] (unsigned int pIndex)
 [] operator
const math::Vector< real > & operator[] (unsigned int pIndex) const
 [] operator
virtual void closestPoint (const math::Vector< real > &pRefPoint, math::Vector< real > &pResPoint)
 return closest point
virtual bool intersect (const Line &pLine, QVector< math::Vector< real > > &pResPoints)
 return intersection point(s) with line
virtual bool intersect (const Ray &pRay, QVector< math::Vector< real > > &pResPoints)
 return intersection point(s) with ray
 operator base::String ()
base::String info () const
 print vector information

Protected Attributes

bool mClosed
QVector< math::Vector< real > > mPoints

Friends

std::ostream & operator<< (std::ostream &pOstream, const PolyLine &pPolyLine)
 print vector information

Constructor & Destructor Documentation

PolyLine::PolyLine (  ) 

default constructor

PolyLine::PolyLine ( unsigned int  pDim  ) 

create polyline

Parameters:
pDim dimension

PolyLine::PolyLine ( const QVector< math::Vector< real > > &  pPoints  ) 

copy constructor

Parameters:
pPoints vector of points
Remarks:
fails if pPoints contains zero points

PolyLine::PolyLine ( unsigned int  pDim,
unsigned int  pPointCount,
const real pPoints 
)

copy constructor

Parameters:
pDim dimension
pPointCount number of points
pPoints points

PolyLine::PolyLine ( const PolyLine pPolyLine  ) 

copy constructor

Parameters:
pPolyLine poly line

PolyLine::~PolyLine (  ) 

destructor


Member Function Documentation

bool PolyLine::closed (  )  const

void PolyLine::setClosed ( bool  pClosed  ) 

void PolyLine::calcMinMaxPos (  )  [virtual]

calculate minimum and maximum positions

Implements iso::geom::Geometry.

unsigned int PolyLine::pointCount (  )  const

return number of points

Returns:
number of points

const QVector< math::Vector< real > > & PolyLine::points (  )  const

return points

Returns:
points

QVector< math::Vector< real > > & PolyLine::points (  ) 

return points

Returns:
points

const math::Vector< real > & PolyLine::point ( unsigned int  pIndex  )  const

return point

Parameters:
pIndex index of point
Returns:
point
Remarks:
fails if index is out of bounds

math::Vector< real > & PolyLine::point ( unsigned int  pIndex  ) 

return point

Parameters:
pIndex index of point
Returns:
point
Remarks:
fails if index is out of bounds

void PolyLine::append ( const math::Vector< float > &  pPoint  ) 

void PolyLine::clear (  ) 

remove all points from polyline

void PolyLine::append ( const PolyLine pPolyLine  ) 

append polyline at end of polyline

Parameters:
pPolyline polyline
Remarks:
fails if dimension mismatch

void PolyLine::replace ( int  pPointCount,
const real pPoints 
)

replace polyline

Parameters:
pPointCount 
pPoints points

void PolyLine::replace ( unsigned int  pIndex,
const math::Vector< float > &  pPoint 
)

replace point in polyline

Parameters:
pIndex index of point
pPoint point
Remarks:
fails if index is out of bounds or dimension mismatch

void PolyLine::replace ( unsigned int  pIndex,
const PolyLine pPolyLine 
)

replace polyline with polyline

Parameters:
pIndex starting index
pPolyline polyline
Remarks:
fails if index is out of bounds or dimension mismatch
polyline will be extended if the new polyline exceeds the current one

const PolyLine & PolyLine::operator= ( const PolyLine pPolyLine  ) 

assigment operator

Parameters:
pPolyLine polyline
Remarks:
fails if dimension mismatch
entire content of polyline will be replaced with content of passed polyline

math::Vector< real > & iso::geom::PolyLine::operator[] ( unsigned int  pIndex  )  [inline]

[] operator

Parameters:
pIndex index of point
Returns:
point
Remarks:
fails if index is out of bounds

const math::Vector< real > & iso::geom::PolyLine::operator[] ( unsigned int  pIndex  )  const [inline]

[] operator

Parameters:
pIndex index of point
Returns:
point
Remarks:
fails if index is out of bounds

void PolyLine::closestPoint ( const math::Vector< real > &  pRefPoint,
math::Vector< real > &  pResPoint 
) [virtual]

return closest point

Parameters:
pRefPoint reference points
pResPoint result point
Remarks:
fails if dimension of reference and result points don't match dimension of geometry

Implements iso::geom::Geometry.

bool PolyLine::intersect ( const Line pLine,
QVector< math::Vector< real > > &  pResPoints 
) [virtual]

return intersection point(s) with line

Parameters:
pLine line
pResPoint result point
Returns:
true if there is an intersection, false otherwise
Remarks:
fails if dimensions don't match

bool PolyLine::intersect ( const Ray pRay,
QVector< math::Vector< real > > &  pResPoints 
) [virtual]

return intersection point(s) with ray

Parameters:
pRay ray
pResPoint result point
Returns:
true if there is an intersection, false otherwise
Remarks:
fails if dimensions don't match

iso::geom::PolyLine::operator base::String (  )  [inline]

base::String PolyLine::info (  )  const

print vector information


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  pOstream,
const PolyLine pPolyLine 
) [friend]

print vector information

Parameters:
pOstream output stream
pPolyLine polyline
Returns:
output stream


Member Data Documentation

bool iso::geom::PolyLine::mClosed [protected]

QVector< math::Vector<real> > iso::geom::PolyLine::mPoints [protected]


The documentation for this class was generated from the following files:
Generated on Wed Jun 2 20:43:24 2010 for iso_geom by  doxygen 1.5.1