📄 beziercurve.h
字号:
#pragma once
#include <cmath>
class BezierCurve
{
private:
//INSTANT C++ WARNING: Since the array size is not known in this declaration, Instant C++ has converted this array to a pointer. You will need to call 'delete[]' where appropriate:
double *FactorialLookup;
public:
BezierCurve();
~BezierCurve( void ) ;
// just check if n is appropriate, then return the result
private:
double factorial(int n);
// create lookup table for fast factorial calculation
void CreateFactorialTable();
double Ni(int n, int i);
// Calculate Bernstein basis
double Bernstein(int n, int i, double t);
double *a;
public:
void Bezier2D(double b[], int npts, int cpts, double p[]);
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -