# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CBezierPatch Class Reference

A standard bezier patch of float. More...

#include <bezier_patch.h>

List of all members.

Public Methods

 CBezierPatch ()
 Constructor: undefined Bezier patch!! More...

void make (CVector vertices[4], CVector normals[4])
 complete computation of Vertices, Tangents, and Interiors, provinding the vertices and vertex normals. More...

void makeInteriors ()
 make default Interiors, according to Vertices and Tangents. More...

void applyMatrix (const CMatrix &m)
 Do the matrix transformation m*patch. More...

CVector eval (float s, float t) const
 Evaluate. More...

CVectorD evalDouble (double s, double t) const
 Evaluate, but return a vector double. More...

CVector evalNormal (float s, float t) const
 Evaluate the normal at (s,t). returned vector is normalized. More...

CVector evalTangentS (float s, float t) const
 Evaluate the tangentS at (s,t). returned vector is normalized. More...

CVector evalTangentT (float s, float t) const
 Evaluate the tangentT at (s,t). returned vector is normalized. More...

Subdivision.
void subdivideS (CBezierPatch &left, CBezierPatch &right, float s=0.5f) const
 Subdivide the bezier patch in 2 bezier patch along s, at s (beetween [0,1]). More...

void subdivideT (CBezierPatch &top, CBezierPatch &bottom, float t=0.5f) const
 Subdivide the bezier patch in 2 bezier patch along t, at t (beetween [0,1]). More...


Public Attributes

CVector Vertices [4]
 The vertices a,b,c,d of the quad patch. More...

CVector Tangents [8]
 The tangents ab, ba, bc, cb, cd, dc, da, ad. NB: tangents are points, not vectors. More...

CVector Interiors [4]
 The interiors, ia,ib,ic,id. NB: interiors are points, not vectors. More...


Detailed Description

A standard bezier patch of float.

(quadpatch only). QuadPatch layout (same notations as 3ds Max SDK).

0 ---s---> 3

A---> ad ---- da <---D | | | | | | v v | ab ia id dc t | | | | | | v ba ib ic cd ^ ^ | | | | B---> bc ---- cb <---C 1 2

Author:
Lionel Berenguier , Nevrax France
Date:
2000

Definition at line 73 of file bezier_patch.h.


Constructor & Destructor Documentation

NL3D::CBezierPatch::CBezierPatch   [inline]
 

Constructor: undefined Bezier patch!!

Definition at line 86 of file bezier_patch.h.

Referenced by subdivideS.


Member Function Documentation

void NL3D::CBezierPatch::applyMatrix const CMatrix &    m
 

Do the matrix transformation m*patch.

Definition at line 73 of file bezier_patch.cpp.

References Interiors, Tangents, and Vertices.

CVector NL3D::CBezierPatch::eval float    s,
float    t
const
 

Evaluate.

Definition at line 105 of file bezier_patch.cpp.

References Interiors, NL3D::mulAdd, Tangents, and Vertices.

CVectorD NL3D::CBezierPatch::evalDouble double    s,
double    t
const
 

Evaluate, but return a vector double.

Definition at line 145 of file bezier_patch.cpp.

References Interiors, NL3D::mulAddD, Tangents, and Vertices.

CVector NL3D::CBezierPatch::evalNormal float    s,
float    t
const
 

Evaluate the normal at (s,t). returned vector is normalized.

Definition at line 187 of file bezier_patch.cpp.

References Interiors, NL3D::mulAdd, Tangents, and Vertices.

CVector NL3D::CBezierPatch::evalTangentS float    s,
float    t
const
 

Evaluate the tangentS at (s,t). returned vector is normalized.

Definition at line 271 of file bezier_patch.cpp.

References Interiors, NL3D::mulAdd, Tangents, and Vertices.

CVector NL3D::CBezierPatch::evalTangentT float    s,
float    t
const
 

Evaluate the tangentT at (s,t). returned vector is normalized.

Definition at line 321 of file bezier_patch.cpp.

References Interiors, NL3D::mulAdd, Tangents, and Vertices.

void NL3D::CBezierPatch::make CVector    vertices[4],
CVector    normals[4]
 

complete computation of Vertices, Tangents, and Interiors, provinding the vertices and vertex normals.

Definition at line 36 of file bezier_patch.cpp.

References makeInteriors, Tangents, and Vertices.

void NL3D::CBezierPatch::makeInteriors  
 

make default Interiors, according to Vertices and Tangents.

Definition at line 61 of file bezier_patch.cpp.

References Interiors, Tangents, and Vertices.

Referenced by make.

void NL3D::CBezierPatch::subdivideS CBezierPatch &    left,
CBezierPatch &    right,
float    s = 0.5f
const
 

Subdivide the bezier patch in 2 bezier patch along s, at s (beetween [0,1]).

NB: left goes from 0 to s, right goes from s to 1.

Definition at line 391 of file bezier_patch.cpp.

References CBezierPatch, Interiors, s, Tangents, and Vertices.

void NL3D::CBezierPatch::subdivideT CBezierPatch &    top,
CBezierPatch &    bottom,
float    t = 0.5f
const
 

Subdivide the bezier patch in 2 bezier patch along t, at t (beetween [0,1]).

NB: top goes from 0 to t, bottom goes from t to 1.

Definition at line 422 of file bezier_patch.cpp.

References Interiors, t, Tangents, and Vertices.


Member Data Documentation

CVector NL3D::CBezierPatch::Interiors[4]
 

The interiors, ia,ib,ic,id. NB: interiors are points, not vectors.

Definition at line 81 of file bezier_patch.h.

Referenced by applyMatrix, eval, evalDouble, evalNormal, evalTangentS, evalTangentT, makeInteriors, subdivideS, and subdivideT.

CVector NL3D::CBezierPatch::Tangents[8]
 

The tangents ab, ba, bc, cb, cd, dc, da, ad. NB: tangents are points, not vectors.

Definition at line 79 of file bezier_patch.h.

Referenced by applyMatrix, eval, evalDouble, evalNormal, evalTangentS, evalTangentT, make, makeInteriors, subdivideS, and subdivideT.

CVector NL3D::CBezierPatch::Vertices[4]
 

The vertices a,b,c,d of the quad patch.

Definition at line 77 of file bezier_patch.h.

Referenced by applyMatrix, eval, evalDouble, evalNormal, evalTangentS, evalTangentT, make, makeInteriors, subdivideS, and subdivideT.


The documentation for this class was generated from the following files: