~hikiko/nux/arb-srgba-shader

« back to all changes in this revision

Viewing changes to NuxCore/Math/Bezier.h

  • Committer: Neil Jagdish Patel
  • Date: 2010-09-01 19:25:37 UTC
  • Revision ID: neil.patel@canonical.com-20100901192537-mfz7rm6q262pewg6
Import and build NuxCore

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef BEZIER_H
 
2
#define BEZIER_H
 
3
 
 
4
#include "Constants.h"
 
5
 
 
6
NAMESPACE_BEGIN
 
7
 
 
8
//! Evaluate the Bernstein polynomial of degree n, at parameter t.
 
9
/*!
 
10
    Evaluate the Bernstein polynomial of degree n, at parameter t.
 
11
    
 
12
    @param n The degree of the Bernstein basis polynomials.
 
13
    @param t The evaluation point.
 
14
 
 
15
    @return the values of the n+1 Bernstein basis of degree n.
 
16
*/
 
17
INL_DECLSPEC_DLL t_double* Bernstein(t_int n, t_double t);
 
18
 
 
19
//! Evaluate 2D Bezier curve of degree n.
 
20
/*!
 
21
    Evaluate 2D Bezier curve of degree n.
 
22
 
 
23
    @param n The degree of the Bezier curve.
 
24
    @param t Parameter.
 
25
    @param xcon Array of n+1 x coordinates of control points.
 
26
    @param ycon Array of n+1 y coordinates of control points.
 
27
    @param xval Return the x coordinates of the Bezier curve at parameter t.
 
28
    @param yval Return the y coordinates of the Bezier curve at parameter t.
 
29
*/
 
30
INL_DECLSPEC_DLL void Bezier_XY(t_int n, t_double t, t_double xcon[], t_double ycon[], t_double *xval, t_double *yval);
 
31
 
 
32
//! Evaluate 2D Bezier curve of degree n.
 
33
/*!
 
34
    Evaluate 2D Bezier curve of degree n.
 
35
 
 
36
    @param n The degree of the Bezier curve.
 
37
    @param t Parameter.
 
38
    @param xcon Array of n+1 x coordinates of control points.
 
39
    @param ycon Array of n+1 y coordinates of control points.
 
40
    @param ycon Array of n+1 z coordinates of control points.
 
41
    @param xval Return the x coordinates of the Bezier curve at parameter t.
 
42
    @param yval Return the y coordinates of the Bezier curve at parameter t.
 
43
    @param yval Return the z coordinates of the Bezier curve at parameter t.
 
44
*/
 
45
INL_DECLSPEC_DLL void Bezier_XYZ(t_int n, t_double t, t_double xcon[], t_double ycon[], t_double zcon[], t_double *xval, t_double *yval, t_double *zval);
 
46
 
 
47
 
 
48
 
 
49
NAMESPACE_END
 
50
 
 
51
#endif // BEZIER_H
 
52
 
 
53