class K2dBorderSinCurve

Representation of a sinus curve as a Border. More...

Definition#include <k2dgrflow/k2dborderbase.h>
InheritsK2dBorderBase [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Private Methods

Private Members


Detailed Description

Representation of a sinus curve as a Border. Inherits the astract class BorderBase the sine is prescribed by 4 variable, always starts at x=0.

 K2dBorderSinCurve (double L, double a, double V, uint n, double b )

K2dBorderSinCurve

construct an sine curve with length L, slope a, amplitude V, nr of hills n, offset b

 ~K2dBorderSinCurve ()

~K2dBorderSinCurve

[virtual]

void  draw (QPainter* ,bool meshed = false )

draw

[virtual]

draw on a painter the sinus

Reimplemented from K2dBorderBase.

void  changeSinCurve ( double L, double a, double V, uint n, double b )

changeSinCurve

Change the sine in one action. This automatically recalculates interval points One action for less overhead in recalculating interval

bool  onBorder (const double &co1, const double &co2 , bool meshed)

onBorder

[const virtual]

see if a certain given point is on the border Remark : since we work with double, we take the defined TOPONUMEPS as allowed difference to be equal

Reimplemented from K2dBorderBase.

void  minCo (uint coordIndex, double &valueMin)

minCo

[const virtual]

we want to be able to retrieve the min and maximum values of border coordIndex is the index, eg 0 for the first, 1 for the second; and value is the present min or max the function changes this if necessary.

Reimplemented from K2dBorderBase.

void  maxCo (uint coordIndex, double &valueMax)

maxCo

[const virtual]

Reimplemented from K2dBorderBase.

double  getLength ()

getLength

[const]

function to retrieve internal data sine

double  getSlope ()

getSlope

[const]

function to retrieve internal data sine

double  getAmplitude ()

getAmplitude

[const]

function to retrieve internal data sine

double  getOffset ()

getOffset

[const]

function to retrieve internal data sine

int  getHills ()

getHills

[const]

function to retrieve internal data sine

int  nrMeshIntervalPoints ()

nrMeshIntervalPoints

[const]

return the number of mesh interval points currently set on the curve, default = 0

void  setNrMeshInterval (int)

setNrMeshInterval

set the meshinterval to a certain value (default = 0), the points are recalculated if changed. beware to give value >=0

bool  reverseValue ()

reverseValue

[const]

return how the curve is transversed, false is normal t from 0 to 1, true is transverse, t from 1 to 0

void  setReverse (bool )

setReverse

set how the curve is transversed

double  triaSize ()

triaSize

[const]

Return trianglesize in meshpoints on the sine, is default initialized on construction by 1, so 1 is returned if never set before

void  changeTriaSize (double size)

changeTriaSize

Change the trianglesize for the meshpoints

BorderType  type ()

type

[virtual]

return the type of the Border (something like the name)

Reimplemented from K2dBorderBase.

void  printBorder (QTextStream &)

printBorder

[virtual]

Implementation of base class printBorder

Reimplemented from K2dBorderBase.

friend QTextStreamoperator<< ( QTextStream &, const K2dBorderSinCurve & )

operator<<

write a line to the ouputstream in a nice text format

double length

length

[private]

double slope

slope

[private]

double amplitude

amplitude

[private]

double offset

offset

[private]

int hills

hills

[private]

int nrMeshPoints

nrMeshPoints

[private]

bool reverse

reverse

[private]

double  value1 (double t)

value1

[private const]

internal functioni that computes first coordinate with a given t, parameter between 0 .. 1

double  value2 (double t)

value2

[private const]

internal functioni that computes second coordinate with a given t, parameter between 0 .. 1

void  calcMeshIntervalPoints ()

calcMeshIntervalPoints

[private]

internal function that recalculates the value of the points between begin and endpoint in the mesh