2013-01-19 22:42:50 +00:00
|
|
|
#ifndef _PAYSAGES_TOOLS_CURVE_H_
|
|
|
|
#define _PAYSAGES_TOOLS_CURVE_H_
|
2012-03-08 15:10:25 +00:00
|
|
|
|
2012-04-22 17:12:39 +00:00
|
|
|
#include "pack.h"
|
2012-03-08 15:10:25 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct {
|
2012-06-17 09:40:40 +00:00
|
|
|
double position;
|
|
|
|
double value;
|
2012-03-08 15:10:25 +00:00
|
|
|
} CurvePoint;
|
|
|
|
typedef struct Curve Curve;
|
|
|
|
|
|
|
|
Curve* curveCreate();
|
|
|
|
void curveDelete(Curve* curve);
|
|
|
|
void curveCopy(Curve* source, Curve* destination);
|
|
|
|
|
2012-04-22 17:12:39 +00:00
|
|
|
void curveSave(PackStream* stream, Curve* curve);
|
|
|
|
void curveLoad(PackStream* stream, Curve* curve);
|
2012-03-08 15:10:25 +00:00
|
|
|
|
|
|
|
void curveClear(Curve* curve);
|
2012-07-02 15:35:10 +00:00
|
|
|
void curveSetDefault(Curve* curve, double value);
|
2012-03-08 15:10:25 +00:00
|
|
|
int curveAddPoint(Curve* curve, CurvePoint* point);
|
2012-06-17 09:40:40 +00:00
|
|
|
int curveQuickAddPoint(Curve* curve, double position, double value);
|
2012-03-08 15:10:25 +00:00
|
|
|
int curveGetPointCount(Curve* curve);
|
|
|
|
void curveGetPoint(Curve* curve, int number, CurvePoint* point);
|
2012-03-08 15:56:44 +00:00
|
|
|
void curveSetPoint(Curve* curve, int number, CurvePoint* point);
|
2012-03-31 11:32:03 +00:00
|
|
|
void curveRemovePoint(Curve* curve, int number);
|
2012-03-08 15:10:25 +00:00
|
|
|
void curveValidate(Curve* curve);
|
|
|
|
|
2012-06-17 09:40:40 +00:00
|
|
|
double curveGetValue(Curve* curve, double position);
|
2012-03-08 15:10:25 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|