NL3D::CBezierPatch::CBezierCurve Struct Reference


Public Member Functions

void get (CVector &a, CVector &b, CVector &c, CVector &d)
void set (const CVector &a, const CVector &b, const CVector &c, const CVector &d)
void subdivide (CBezierCurve &left, CBezierCurve &right, float t)

Data Fields

CVector P0
CVector P1
CVector P2
CVector P3

Member Function Documentation

void NL3D::CBezierPatch::CBezierCurve::get CVector a,
CVector b,
CVector c,
CVector d
[inline]
 

Definition at line 130 of file bezier_patch.h.

References P0, P1, P2, and P3.

Referenced by NL3D::CBezierPatch::subdivideS(), and NL3D::CBezierPatch::subdivideT().

00131                 {
00132                         a= P0; b= P1; c= P2; d= P3;
00133                 }

void NL3D::CBezierPatch::CBezierCurve::set const CVector a,
const CVector b,
const CVector c,
const CVector d
[inline]
 

Definition at line 126 of file bezier_patch.h.

References P0, P1, P2, and P3.

Referenced by NL3D::CBezierPatch::subdivideS(), and NL3D::CBezierPatch::subdivideT().

00127                 {
00128                         P0= a; P1= b; P2= c; P3= d;
00129                 }

void NL3D::CBezierPatch::CBezierCurve::subdivide CBezierCurve left,
CBezierCurve right,
float  t
 

Definition at line 371 of file bezier_patch.cpp.

References P0, P1, P2, P3, and t.

Referenced by NL3D::CBezierPatch::subdivideS(), and NL3D::CBezierPatch::subdivideT().

00372 {
00373         float   t1= 1-t;
00374 
00375         // Subdivide the 2 curves.
00376         left.P0= P0;
00377         right.P3= P3;
00378 
00379         left.P1= t1*P0 + t*P1;
00380         right.P2= t1*P2 + t*P3;
00381         CVector         middle12= t1*P1 + t*P2;
00382 
00383         left.P2= t1*left.P1 + t*middle12;
00384         right.P1= t1*middle12 + t*right.P2;
00385 
00386         left.P3= right.P0= t1*left.P2 + t*right.P1;
00387 }


Field Documentation

CVector NL3D::CBezierPatch::CBezierCurve::P0
 

Definition at line 124 of file bezier_patch.h.

Referenced by get(), set(), and subdivide().

CVector NL3D::CBezierPatch::CBezierCurve::P1
 

Definition at line 124 of file bezier_patch.h.

Referenced by get(), set(), and subdivide().

CVector NL3D::CBezierPatch::CBezierCurve::P2
 

Definition at line 124 of file bezier_patch.h.

Referenced by get(), set(), and subdivide().

CVector NL3D::CBezierPatch::CBezierCurve::P3
 

Definition at line 124 of file bezier_patch.h.

Referenced by get(), set(), and subdivide().


The documentation for this struct was generated from the following files:
Generated on Tue Mar 16 06:44:35 2004 for NeL by doxygen 1.3.6