Core 1.0
Public Member Functions | Protected Attributes | List of all members
FrameCurve Class Reference

Piecewize frame curves. More...

#include <curve.h>

Public Member Functions

 FrameCurve ()
 Empty.
 
 FrameCurve (const QVector< Frame > &, bool=false)
 Creates a simple open curve with key frames. More...
 
 FrameCurve (const QVector< Frame > &, const QVector< bool > &, bool=false)
 Creates a curve. More...
 
 ~FrameCurve ()
 Empty.
 
Vector Vertex (int) const
 Access to curve vertices.
 
FrameGetFrame (int)
 Access to curve frames.
 
Frame GetFrame (int) const
 Access to curve frames.
 
bool & Smooth (int)
 Access to curve vertices.
 
bool Smooth (int) const
 Access to curve vertices.
 
Box GetBox () const
 Compute the bounding box of the curve.
 
double Length () const
 Compute the length of the curve.
 
int Size () const
 Return the size of the sampled curve.
 
void Translate (const Vector &)
 Translate a curve. More...
 
void Rotate (const Matrix &)
 Rotate a curve. More...
 
bool IsClosed () const
 Check if the curve is closed.
 

Protected Attributes

QVector< Frameframe
 Array of frames.
 
QVector< bool > smooth
 Array of flags defining whether a frame in the curve should be considered a smooth or not.
 
bool closed = false
 Closed curve flag.
 

Detailed Description

Piecewize frame curves.

Constructor & Destructor Documentation

◆ FrameCurve() [1/2]

FrameCurve::FrameCurve ( const QVector< Frame > &  p,
bool  closed = false 
)

Creates a simple open curve with key frames.

Parameters
pSet of points.
closedFlag defining whether the curve is closed (true) or open (false).

◆ FrameCurve() [2/2]

FrameCurve::FrameCurve ( const QVector< Frame > &  p,
const QVector< bool > &  s,
bool  closed = false 
)

Creates a curve.

Parameters
pSet of points.
sSet of smoothing flags.
closedFlag defining whether the curve is closed (true) or open (false).

Member Function Documentation

◆ Rotate()

void FrameCurve::Rotate ( const Matrix r)

Rotate a curve.

Parameters
rRotation matrix.

◆ Translate()

void FrameCurve::Translate ( const Vector t)

Translate a curve.

Parameters
tTranslation vector.