#include <iso_synth_point_list.h>
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 PointList & | operator= (const PointList &pPointList) |
assignment operator | |
const Frame & | operator= (const Frame &pFrame) throw (SynthException) |
assignment operator | |
PointList & | operator<< (const math::Vector2< sample > &pPoint) |
append point to list | |
PointList & | operator<< (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 |
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.
PointList::PointList | ( | ) |
default constructor
creates empty point list
PointList::PointList | ( | unsigned int | pPointCount | ) |
parameter based constructor
pPointCount | number of points to create |
PointList::PointList | ( | unsigned int | pPointCount, | |
const math::Vector2< sample > & | pPoint | |||
) |
parameter based constructor
pPointCount | number of points to create | |
pPoint | point to copy position from |
PointList::PointList | ( | unsigned int | pPointCount, | |
double | pValueX, | |||
double | pValueY, | |||
... | ||||
) |
copy constructor
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
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
pPointList | pointList to copy parameters from |
PointList::PointList | ( | const Frame & | pFrame | ) | throw (SynthException) |
parameter based constructor
pFrame | frame to derive points from |
SynthException | number of channels in frame not even |
PointList::PointList | ( | const serialize::SerializeData & | pSerializeData | ) | throw (serialize::SerializeException) |
serialization based constructor
pSerializeData | serialization data |
SerializeException | failed to create point list |
PointList::~PointList | ( | ) |
destructor
serialize::SerializeData PointList::serialize | ( | const String & | pSerialName = sClassName |
) | const [virtual] |
create serializeData for point list
serialize::Serializable * PointList::deSerialize | ( | const serialize::SerializeData & | pSerializeData | ) | throw (serialize::SerializeException) [static] |
create point list from SerializeData
pSerializeData | SerializeData |
SerializeException | incompatible SerializeData |
unsigned int PointList::size | ( | ) | const |
return number of points
const math::Vector2< sample > * PointList::first | ( | ) | const |
return rist point in point list
const math::Vector2< sample > * PointList::last | ( | ) | const |
return last point in point list
const math::Vector2< sample > * PointList::point | ( | unsigned int | pIndex | ) | const throw (base::Exception) |
return point in point list
pIndex | point index |
Exception | index out of range |
const math::Vector2< sample > * PointList::operator[] | ( | unsigned int | pIndex | ) | const throw (base::Exception) |
returns point in point list
pIndex | point index |
Exception | index out of range |
const QVector< math::Vector2< sample > * > & PointList::points | ( | ) | const |
return points
assignment operator
pPointList | point list to copy values from |
const Frame & PointList::operator= | ( | const Frame & | pFrame | ) | throw (SynthException) |
assignment operator
pFrame | frame to copy values from |
append point to list
pPoint | point to append |
append pointList to list
pPointList | pointList to append |
void PointList::append | ( | const math::Vector2< sample > & | pPoint | ) |
append point at end of list
pPoint | point to append |
void PointList::append | ( | const PointList & | pPointList | ) |
append pointList at end of list
pPointList | pointList to append |
void PointList::prepend | ( | const math::Vector2< sample > & | pPoint | ) |
prepend point at end of list
pPoint | point to prepend |
void PointList::prepend | ( | const PointList & | pPointList | ) |
prepend pointList at end of list
pPointList | pointList to prepend |
void PointList::insert | ( | unsigned int | pIndex, | |
const math::Vector2< sample > & | pPoint | |||
) | throw (SynthException) |
insert point into list
pIndex | position of insertion | |
pPoint | point to insert |
SynthException | out of bounds error |
void PointList::insert | ( | unsigned int | pIndex, | |
const PointList & | pPointList | |||
) | throw (SynthException) |
insert pointList into list
pIndex | position of insertion | |
pPointList | pPointList to insert |
SynthException | out of bounds error |
void PointList::overwrite | ( | unsigned int | pIndex, | |
const math::Vector2< sample > & | pPoint | |||
) | throw (SynthException) |
overwrite point in list
pIndex | overwrite position | |
pPoint | new point |
SynthException | out of bounds error |
void PointList::overwrite | ( | unsigned int | pIndex, | |
const PointList & | pPointList | |||
) | throw (SynthException) |
overwrite region in list
pIndex | overwrite start position | |
pPointList | new pointList region |
SynthException | out of bounds error |
void PointList::remove | ( | unsigned int | pIndex, | |
unsigned int | pPointCount | |||
) | throw (SynthException) |
remove region from list
pIndex | start position | |
pPointCount | number of points to remove |
SynthException | out of bounds error |
bool PointList::sorted | ( | ) |
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
redistribute x values of points in between new x limits
pMinX | new mimimum xValue | |
pMaxX | new maximume xValue |
redistribute y values of points in between new y limits
pMinY | new mimimum yValue | |
pMaxY | new maximume yValue |
String PointList::info | ( | bool | pPropagate = false |
) | const |
obtain curve information
pPropagate | ignored |
std::ostream& operator<< | ( | std::ostream & | pOstream, | |
const PointList & | pPointList | |||
) | [friend] |
print curve information
const String PointList::sClassName [static] |
default name
QVector<math::Vector2<sample>*> iso::synth::PointList::mPoints [protected] |
vector of points