Gin
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Catenary Class Reference

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

#include <gin_catenary.h>

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.
 
std::pair< float, floatgetVertex () const
 get curve vertex = lowest point
 

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: