home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 March
/
VPR9703A.ISO
/
VPR_DATA
/
DOGA
/
SOURCES
/
MEDIT.LZH
/
BEZIER.H
< prev
next >
Wrap
C/C++ Source or Header
|
1995-09-26
|
947b
|
45 lines
#ifndef _BEZIER_
#define _BEZIER_
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
enum BezierControl {BCInd, BCdep, BCsame};
class Vector;
class Bezier {
public:
int allocpoints;
int points;
int lengthvalid;
Vector *point; // alloc = 3points+1
double *length; // alloc = points
double GetRate(double l);
Vector GetPoint(double t);
Vector GetVector(double t);
double TotalLength(void);
void UpdateLength(void);
void UpdateLength(int i);
void AddPoint(Vector& v1, Vector& v2, Vector& v3);
void AddPoint(Vector& p1, Vector& p2);
void AddSpline(Vector *p, int num);
void MovePoint(int pos, Vector& p, BezierControl flag = BCdep);
void InsertPoint(int pos);
void InsertPoint(int pos, Vector& v1, Vector& v2);
void DeletePoint(int pos);
Bezier();
Bezier(Bezier& b);
Bezier(Vector& v1);
Bezier(Vector& v1, Vector& v2);
~Bezier();
private:
void AllocPoint(int num);
};
#endif