PeriDyno 1.0.0
Loading...
Searching...
No Matches
dyno::Ramp Class Reference

#include <Ramp.h>

Inheritance diagram for dyno::Ramp:
Collaboration diagram for dyno::Ramp:

Public Member Functions

 Ramp ()
 
 Ramp (Direction dir)
 
 Ramp (const Ramp &ramp)
 
 ~Ramp ()
 
float getCurveValueByX (float inputX)
 Get the value value"Y" of the curve by value"X" .
 
void updateBezierCurve () override
 Update the data of the Bezier curve points.
 
double calculateLengthForPointSet (std::vector< Coord2D > BezierPtSet)
 
void updateResampleBezierCurve ()
 Resample Bezier curve.
 
void borderCloseResort ()
 Reordering points on canvas boundaries.
 
void UpdateFieldFinalCoord () override
 Updating the data of a Field.
 
- Public Member Functions inherited from dyno::Canvas
 Canvas ()
 
 ~Canvas ()
 
void addPoint (float x, float y)
 
void addPointAndHandlePoint (Coord2D point, Coord2D handle_1, Coord2D handle_2)
 
void addFloatItemToCoord (float x, float y, std::vector< Coord2D > &coordArray)
 
void clearMyCoord ()
 
void setCurveClose (bool s)
 
void setInterpMode (bool useBezier)
 
void setResample (bool s)
 
void setUseSquard (bool s)
 
void useBezier ()
 
void useLinear ()
 
void setSpacing (double s)
 
void remapX (double minX, double maxX)
 
void remapY (double minY, double maxY)
 
void remapXY (double minX, double maxX, double minY, double maxY)
 
void setRange_MinX (float min, float max)
 
void setRange_MaxX (float min, float max)
 
void setRange_MinY (float min, float max)
 
void setRange_MaxY (float min, float max)
 
void setRange (float min, float max)
 
void addItemOriginalCoord (int x, int y)
 
void addItemHandlePoint (int x, int y)
 
void updateBezierPointToBezierSet (Coord2D p0, Coord2D p1, Coord2D p2, Coord2D p3, std::vector< Coord2D > &bezierSet)
 
void updateResampleLinearLine ()
 
void resamplePointFromLine (std::vector< Coord2D > pointSet)
 
std::vector< Coord2DgetPoints ()
 
unsigned getPointSize ()
 
void convertCoordToStr (std::string VarName, std::vector< Canvas::Coord2D > Array, std::string &Str)
 
template<typename T>
void convertVarToStr (std::string VarName, T value, std::string &Str)
 
void setVarByStr (std::string Str, double &value)
 
void setVarByStr (std::string Str, float &value)
 
void setVarByStr (std::string Str, int &value)
 
void setVarByStr (std::string Str, bool &value)
 
void setVarByStr (std::string Str, Canvas::Interpolation &value)
 
void setVarByStr (std::string Str, Direction &value)
 

Public Attributes

Direction Dirmode = x
 
std::string DirectionStrings [int(Direction::count)] = { "x","y" }
 
std::vector< Coord2DmyBezierPoint_H
 
std::vector< Coord2DFE_MyCoord
 
std::vector< Coord2DFE_HandleCoord
 
- Public Attributes inherited from dyno::Canvas
Canvas::Interpolation mInterpMode = Linear
 
std::vector< Coord2DmCoord
 
std::vector< Coord2DmBezierPoint
 
std::vector< Coord2DmFinalCoord
 
std::vector< Coord2DmResamplePoint
 
std::vector< double > mLengthArray
 
std::vector< Coord2DmyHandlePoint
 
std::string InterpStrings [2] = { "Linear","Bezier" }
 
std::vector< OriginalCoordOriginalcoord
 
std::vector< OriginalCoordOriginalHandlePoint
 
float remapRange [8] = { -3,3,-3,3,-3,3,-3,3 }
 
double NminX = 0
 
double NmaxX = 1
 
double mNewMinY = 0
 
double NmaxY = 1
 
bool lockSize = false
 
bool useBezierInterpolation = false
 
bool resample = true
 
bool curveClose = false
 
bool useColseButton = true
 
bool useSquard = true
 
bool useSquardButton = true
 
float Spacing = 5
 
float segment = 10
 
float resampleResolution = 20
 
std::map< float, EndPointlength_EndPoint_Map
 

Private Attributes

float xLess = 1
 
float xGreater = 0
 
float yLess = 1
 
float yGreater = 0
 

Additional Inherited Members

- Public Types inherited from dyno::Canvas
enum  Direction { x = 0 , y = 1 , count = 2 }
 
enum  Interpolation { Linear = 0 , Bezier = 1 , InterpolationCount = 2 }
 
enum  CurveMode { Open = 0 , Close = 1 }
 
- Protected Member Functions inherited from dyno::Canvas
void rebuildHandlePoint (std::vector< Coord2D > coordSet)
 
void buildSegMent_Length_Map (std::vector< Coord2D > BezierPtSet)
 

Detailed Description

Definition at line 16 of file Ramp.h.

Constructor & Destructor Documentation

◆ Ramp() [1/3]

dyno::Ramp::Ramp ( )

Definition at line 5 of file Ramp.cpp.

Here is the caller graph for this function:

◆ Ramp() [2/3]

dyno::Ramp::Ramp ( Direction dir)

Definition at line 10 of file Ramp.cpp.

◆ Ramp() [3/3]

dyno::Ramp::Ramp ( const Ramp & ramp)

Definition at line 16 of file Ramp.cpp.

Here is the call graph for this function:

◆ ~Ramp()

dyno::Ramp::~Ramp ( )
inline

Definition at line 23 of file Ramp.h.

Member Function Documentation

◆ borderCloseResort()

void dyno::Ramp::borderCloseResort ( )

Reordering points on canvas boundaries.

Definition at line 201 of file Ramp.cpp.

Here is the caller graph for this function:

◆ calculateLengthForPointSet()

double dyno::Ramp::calculateLengthForPointSet ( std::vector< Coord2D > BezierPtSet)

Definition at line 178 of file Ramp.cpp.

Here is the call graph for this function:

◆ getCurveValueByX()

float dyno::Ramp::getCurveValueByX ( float inputX)

Get the value value"Y" of the curve by value"X" .

Definition at line 67 of file Ramp.cpp.

◆ updateBezierCurve()

void dyno::Ramp::updateBezierCurve ( )
overridevirtual

Update the data of the Bezier curve points.

Reimplemented from dyno::Canvas.

Definition at line 101 of file Ramp.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateFieldFinalCoord()

void dyno::Ramp::UpdateFieldFinalCoord ( )
overridevirtual

Updating the data of a Field.

Reimplemented from dyno::Canvas.

Definition at line 269 of file Ramp.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateResampleBezierCurve()

void dyno::Ramp::updateResampleBezierCurve ( )

Resample Bezier curve.

Definition at line 122 of file Ramp.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ DirectionStrings

std::string dyno::Ramp::DirectionStrings[int(Direction::count)] = { "x","y" }

Definition at line 52 of file Ramp.h.

◆ Dirmode

Direction dyno::Ramp::Dirmode = x

Definition at line 50 of file Ramp.h.

◆ FE_HandleCoord

std::vector<Coord2D> dyno::Ramp::FE_HandleCoord

Definition at line 56 of file Ramp.h.

◆ FE_MyCoord

std::vector<Coord2D> dyno::Ramp::FE_MyCoord

Definition at line 55 of file Ramp.h.

◆ myBezierPoint_H

std::vector<Coord2D> dyno::Ramp::myBezierPoint_H

Definition at line 53 of file Ramp.h.

◆ xGreater

float dyno::Ramp::xGreater = 0
private

Definition at line 61 of file Ramp.h.

◆ xLess

float dyno::Ramp::xLess = 1
private

Definition at line 60 of file Ramp.h.

◆ yGreater

float dyno::Ramp::yGreater = 0
private

Definition at line 63 of file Ramp.h.

◆ yLess

float dyno::Ramp::yLess = 1
private

Definition at line 62 of file Ramp.h.


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