Gin
Public Member Functions | List of all members
Catenary Class Reference

A catenary is the shape a wire, cable, rope etc. More...

Public Member Functions

 Catenary (float x0, float y0, float x1, float y1, float addLength, int numIterations=1)
 
void calculate (float x0, float y0, float x1, float y1, float addLength, int numIterations=1)
 
float calcY (float x) const
 determine the y pos for a given x. More...
 
std::pair< float, float > getVertex () const
 get curve vertex = lowest point More...
 

Detailed Description

A catenary is the shape a wire, cable, rope etc.

makes when it hangs. Useful for drawing modular synths.

Constructor & Destructor Documentation

◆ Catenary()

Catenary::Catenary ( float  x0,
float  y0,
float  x1,
float  y1,
float  addLength,
int  numIterations = 1 
)

References calculate().

Member Function Documentation

◆ calculate()

void Catenary::calculate ( float  x0,
float  y0,
float  x1,
float  y1,
float  addLength,
int  numIterations = 1 
)

Referenced by Catenary().

◆ calcY()

float Catenary::calcY ( float  x) const

determine the y pos for a given x.

◆ getVertex()

std::pair<float, float> Catenary::getVertex ( ) const

get curve vertex = lowest point


The documentation for this class was generated from the following file: