![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "curve_tools.h"
#include <float.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
Go to the source code of this file.
Macros | |
#define | EPSILON 2 * FLT_MIN |
#define | MAX_ITER 10 |
Functions | |
float | spline_cubic_val (int n, float t[], float tval, float y[], float ypp[]) |
float | catmull_rom_val (int n, float x[], float xval, float y[], float tangents[]) |
float * | spline_cubic_set (int n, float t[], float y[]) |
float * | catmull_rom_set (int n, float x[], float y[]) |
float * | monotone_hermite_set (int n, float x[], float y[]) |
float * | d3_np_fs (int n, float a[], float b[]) |
static float * | spline_cubic_set_internal (int n, float t[], float y[], int ibcbeg, float ybcbeg, int ibcend, float ybcend) |
float * | interpolate_set (int n, float x[], float y[], unsigned int type) |
float | interpolate_val (int n, float x[], float xval, float y[], float tangents[], unsigned int type) |
int | CurveDataSample (CurveData *curve, CurveSample *sample) |
Variables | |
static const int | curvedata_anchors_max = 20 |
float(* | spline_val [])(int, float[], float, float[], float[]) = { spline_cubic_val, catmull_rom_val, catmull_rom_val } |
float *(* | spline_set [])(int, float[], float[]) = { spline_cubic_set, catmull_rom_set, monotone_hermite_set } |
#define EPSILON 2 * FLT_MIN |
#define MAX_ITER 10 |
float * catmull_rom_set | ( | int | n, |
float | x[], | ||
float | y[] | ||
) |
References m.
float catmull_rom_val | ( | int | n, |
float | x[], | ||
float | xval, | ||
float | y[], | ||
float | tangents[] | ||
) |
int CurveDataSample | ( | CurveData * | curve, |
CurveSample * | sample | ||
) |
References CT_ERROR, CT_SUCCESS, interpolate_set(), interpolate_val(), CurveData::m_anchors, CurveData::m_max_x, CurveData::m_max_y, CurveData::m_min_x, CurveData::m_min_y, CurveData::m_numAnchors, CurveSample::m_outputRes, CurveSample::m_Samples, CurveSample::m_samplingRes, CurveData::m_spline_type, CurveAnchorPoint::x, and CurveAnchorPoint::y.
Referenced by dt_draw_curve_calc_values(), get_error(), and main().
float * d3_np_fs | ( | int | n, |
float | a[], | ||
float | b[] | ||
) |
References curvedata_anchors_max.
Referenced by spline_cubic_set_internal().
float * interpolate_set | ( | int | n, |
float | x[], | ||
float | y[], | ||
unsigned int | type | ||
) |
References spline_set, and type.
Referenced by CurveDataSample(), and dt_draw_curve_calc_value().
float interpolate_val | ( | int | n, |
float | x[], | ||
float | xval, | ||
float | y[], | ||
float | tangents[], | ||
unsigned int | type | ||
) |
References spline_val, and type.
Referenced by CurveDataSample(), and dt_draw_curve_calc_value().
float * spline_cubic_set | ( | int | n, |
float | t[], | ||
float | y[] | ||
) |
References spline_cubic_set_internal().
|
static |
References d3_np_fs().
Referenced by spline_cubic_set().
float spline_cubic_val | ( | int | n, |
float | t[], | ||
float | tval, | ||
float | y[], | ||
float | ypp[] | ||
) |
ypval = ( y[ival+1] - y[ival] ) / h
yppval = ypp[ival] + dt * ( ypp[ival+1] - ypp[ival] ) / h;
|
static |
Referenced by d3_np_fs().
float *(* spline_set[])(int, float[], float[]) | ( | int | , |
float | [], | ||
float | [] | ||
) | = { spline_cubic_set, catmull_rom_set, monotone_hermite_set } |
Referenced by interpolate_set().
float(* spline_val[])(int, float[], float, float[], float[]) | ( | int | , |
float | [], | ||
float | , | ||
float | [], | ||
float | [] | ||
) | = { spline_cubic_val, catmull_rom_val, catmull_rom_val } |
Referenced by interpolate_val().