-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnurbs.h
58 lines (50 loc) · 1.3 KB
/
nurbs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef NURBS_H
#define NURBS_H
typedef struct
{
/**
* The spatial dimension in which points are taken.
*/
long dim;
/**
* This is the number of parameters defining
* the objects as a line/surface/volume/etc.,
*/
long nparam;
/**
* The degree of interpolation used to define
* the spline curves in each of the \c nparam
* orthogonal parameters. For example, the
* the degree of interpolation in parameter \c i
* is \c deg[i] where \c i ranges from 0 to
* \c nparam - 1.
*/
long *deg;
/**
* The start index of knots for parameter \c i .
*/
long *iknots;
/**
* These are the actual knot locations for each
* dimension in the parameter space.
*/
double *knots;
/**
* The weights defining the interpolant. There
* are \c n1 * \c ... \c ni , which are the
* numbers of knots in each parameter, and \c i
* is \c nparam . This array makes use of
* multi-indexing in a one-dimensional array
* for generalization of the number of parameters.
*/
double *weights;
/**
* These are the control points. These points lie
* in dimension \c dim . There are \c nparam of
* indexes into \c cpoints . Space allocated to
* \c cpoints must be \c n1 * ... * \c ni , where
* \c ni is the number of knots in parameter \c i .
*/
double *cpoints;
} nurbs_t;
#endif