iso::synth::PointList Class Reference

a simple collection of 2D vectors More...

#include <iso_synth_point_list.h>

List of all members.

Public Member Functions

 PointList ()
 default constructor
 PointList (unsigned int pPointCount)
 parameter based constructor
 PointList (unsigned int pPointCount, const math::Vector2< sample > &pPoint)
 parameter based constructor
 PointList (unsigned int pPointCount, double pValueX, double pValueY,...)
 copy constructor
 PointList (unsigned int pPointCount, math::Vector2< sample > *pPoint1, math::Vector2< sample > *pPoint2,...)
 copy constructor
 PointList (const PointList &pPointList)
 parameter based constructor
 PointList (const Frame &pFrame) throw (SynthException)
 parameter based constructor
 PointList (const serialize::SerializeData &pSerializeData) throw (serialize::SerializeException)
 serialization based constructor
 ~PointList ()
 destructor
virtual serialize::SerializeData serialize (const String &pSerialName=sClassName) const
 create serializeData for point list
unsigned int size () const
 return number of points
const math::Vector2< sample > * first () const
 return rist point in point list
const math::Vector2< sample > * last () const
 return last point in point list
const math::Vector2< sample > * point (unsigned int pIndex) const throw (base::Exception)
 return point in point list
const math::Vector2< sample > * operator[] (unsigned int pIndex) const throw (base::Exception)
 returns point in point list
const QVector< math::Vector2<
sample > * > & 
points () const
 return points
const PointListoperator= (const PointList &pPointList)
 assignment operator
const Frameoperator= (const Frame &pFrame) throw (SynthException)
 assignment operator
PointListoperator<< (const math::Vector2< sample > &pPoint)
 append point to list
PointListoperator<< (const PointList &pPointList)
 append pointList to list
void append (const math::Vector2< sample > &pPoint)
 append point at end of list
void append (const PointList &pPointList)
 append pointList at end of list
void prepend (const math::Vector2< sample > &pPoint)
 prepend point at end of list
void prepend (const PointList &pPointList)
 prepend pointList at end of list
void insert (unsigned int pIndex, const math::Vector2< sample > &pPoint) throw (SynthException)
 insert point into list
void insert (unsigned int pIndex, const PointList &pPointList) throw (SynthException)
 insert pointList into list
void overwrite (unsigned int pIndex, const math::Vector2< sample > &pPoint) throw (SynthException)
 overwrite point in list
void overwrite (unsigned int pIndex, const PointList &pPointList) throw (SynthException)
 overwrite region in list
void remove (unsigned int pIndex, unsigned int pPointCount) throw (SynthException)
 remove region from list
bool sorted ()
 returns true if points are sorted in increasing order according to their x coordinate
void sort ()
 sorts points in increasing order according to their x coordinate
void normalizeX ()
 scales the x-coordinates of all points to the range from 0.0 to 1.0
void normalizeY ()
 scales the y-coordinates of all points to the range from 0.0 to 1.0
void resetXRange (sample pMinX, sample pMaxX)
 redistribute x values of points in between new x limits
void resetYRange (sample pMinY, sample pMaxY)
 redistribute y values of points in between new y limits
String info (bool pPropagate=false) const
 obtain curve information

Static Public Member Functions

static serialize::Serializable * deSerialize (const serialize::SerializeData &pSerializeData) throw (serialize::SerializeException)
 create point list from SerializeData

Static Public Attributes

static const String sClassName
 default name

Protected Attributes

QVector< math::Vector2< sample > * > mPoints
 vector of points

Friends

std::ostream & operator<< (std::ostream &pOstream, const PointList &pPointList)
 print curve information


Detailed Description

a simple collection of 2D vectors

collection of 2D vectors

A simple collection of 2D vectors.
This collection serves as data structure for 2D curves such as line-segments or spline-segment based curves.

Created by Daniel Bisig on 7/17/06. Copyright 2006 Daniel Bisig All rights reserved.


Constructor & Destructor Documentation

PointList::PointList (  ) 

default constructor

creates empty point list

PointList::PointList ( unsigned int  pPointCount  ) 

parameter based constructor

Parameters:
pPointCount number of points to create
points are reset to 0.0 0.0

PointList::PointList ( unsigned int  pPointCount,
const math::Vector2< sample > &  pPoint 
)

parameter based constructor

Parameters:
pPointCount number of points to create
pPoint point to copy position from

PointList::PointList ( unsigned int  pPointCount,
double  pValueX,
double  pValueY,
  ... 
)

copy constructor

Parameters:
pPointCount number of points to create
pValueX x coordinate of first point of a series of points
pValueY y coordinate of first point of a series of points

PointList::PointList ( unsigned int  pPointCount,
math::Vector2< sample > *  pPoint1,
math::Vector2< sample > *  pPoint2,
  ... 
)

copy constructor

Parameters:
pPointCount number of points to create
pPoint1 first point of a series of points
pPoint2 second point of a series of points

PointList::PointList ( const PointList pPointList  ) 

parameter based constructor

Parameters:
pPointList pointList to copy parameters from

PointList::PointList ( const Frame pFrame  )  throw (SynthException)

parameter based constructor

Parameters:
pFrame frame to derive points from
Exceptions:
SynthException number of channels in frame not even

PointList::PointList ( const serialize::SerializeData &  pSerializeData  )  throw (serialize::SerializeException)

serialization based constructor

Parameters:
pSerializeData serialization data
Exceptions:
SerializeException failed to create point list

PointList::~PointList (  ) 

destructor


Member Function Documentation

serialize::SerializeData PointList::serialize ( const String pSerialName = sClassName  )  const [virtual]

create serializeData for point list

Returns:
serializeData

serialize::Serializable * PointList::deSerialize ( const serialize::SerializeData &  pSerializeData  )  throw (serialize::SerializeException) [static]

create point list from SerializeData

Parameters:
pSerializeData SerializeData
Returns:
Serializable
Exceptions:
SerializeException incompatible SerializeData

unsigned int PointList::size (  )  const

return number of points

Returns:
number of points

const math::Vector2< sample > * PointList::first (  )  const

return rist point in point list

Returns:
first point in point list

const math::Vector2< sample > * PointList::last (  )  const

return last point in point list

Returns:
last point in point list

const math::Vector2< sample > * PointList::point ( unsigned int  pIndex  )  const throw (base::Exception)

return point in point list

Parameters:
pIndex point index
Returns:
point in point list
Exceptions:
Exception index out of range

const math::Vector2< sample > * PointList::operator[] ( unsigned int  pIndex  )  const throw (base::Exception)

returns point in point list

Parameters:
pIndex point index
Returns:
point in point list
Exceptions:
Exception index out of range

const QVector< math::Vector2< sample > * > & PointList::points (  )  const

return points

Returns:
points

const PointList & PointList::operator= ( const PointList pPointList  ) 

assignment operator

Parameters:
pPointList point list to copy values from
Returns:
point list

const Frame & PointList::operator= ( const Frame pFrame  )  throw (SynthException)

assignment operator

Parameters:
pFrame frame to copy values from
Returns:
frame

PointList & PointList::operator<< ( const math::Vector2< sample > &  pPoint  ) 

append point to list

Parameters:
pPoint point to append
Returns:
new list

PointList & PointList::operator<< ( const PointList pPointList  ) 

append pointList to list

Parameters:
pPointList pointList to append
Returns:
new list

void PointList::append ( const math::Vector2< sample > &  pPoint  ) 

append point at end of list

Parameters:
pPoint point to append

void PointList::append ( const PointList pPointList  ) 

append pointList at end of list

Parameters:
pPointList pointList to append

void PointList::prepend ( const math::Vector2< sample > &  pPoint  ) 

prepend point at end of list

Parameters:
pPoint point to prepend

void PointList::prepend ( const PointList pPointList  ) 

prepend pointList at end of list

Parameters:
pPointList pointList to prepend

void PointList::insert ( unsigned int  pIndex,
const math::Vector2< sample > &  pPoint 
) throw (SynthException)

insert point into list

Parameters:
pIndex position of insertion
pPoint point to insert
Exceptions:
SynthException out of bounds error

void PointList::insert ( unsigned int  pIndex,
const PointList pPointList 
) throw (SynthException)

insert pointList into list

Parameters:
pIndex position of insertion
pPointList pPointList to insert
Exceptions:
SynthException out of bounds error

void PointList::overwrite ( unsigned int  pIndex,
const math::Vector2< sample > &  pPoint 
) throw (SynthException)

overwrite point in list

Parameters:
pIndex overwrite position
pPoint new point
Exceptions:
SynthException out of bounds error

void PointList::overwrite ( unsigned int  pIndex,
const PointList pPointList 
) throw (SynthException)

overwrite region in list

Parameters:
pIndex overwrite start position
pPointList new pointList region
Exceptions:
SynthException out of bounds error

void PointList::remove ( unsigned int  pIndex,
unsigned int  pPointCount 
) throw (SynthException)

remove region from list

Parameters:
pIndex start position
pPointCount number of points to remove
Exceptions:
SynthException out of bounds error

bool PointList::sorted (  ) 

returns true if points are sorted in increasing order according to their x coordinate

Returns:
returns true if points are sorted in increasing order according to their x coordinate

void PointList::sort (  ) 

sorts points in increasing order according to their x coordinate

void PointList::normalizeX (  ) 

scales the x-coordinates of all points to the range from 0.0 to 1.0

void PointList::normalizeY (  ) 

scales the y-coordinates of all points to the range from 0.0 to 1.0

void PointList::resetXRange ( sample  pMinX,
sample  pMaxX 
)

redistribute x values of points in between new x limits

Parameters:
pMinX new mimimum xValue
pMaxX new maximume xValue

void PointList::resetYRange ( sample  pMinY,
sample  pMaxY 
)

redistribute y values of points in between new y limits

Parameters:
pMinY new mimimum yValue
pMaxY new maximume yValue

String PointList::info ( bool  pPropagate = false  )  const

obtain curve information

Parameters:
pPropagate ignored
Returns:
String containing curve information


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  pOstream,
const PointList pPointList 
) [friend]

print curve information


Member Data Documentation

const String PointList::sClassName [static]

default name

QVector<math::Vector2<sample>*> iso::synth::PointList::mPoints [protected]

vector of points


The documentation for this class was generated from the following files:
Generated on Fri Feb 25 14:18:42 2011 for synth by  doxygen 1.5.1