Main Page   Class Hierarchy   Compound List   File List   Compound Members  

PLib::NurbsCurveGL Class Reference

A NURBS curve class with OpenGL interface. More...

#include <nurbsGL.h>

Inheritance diagram for PLib::NurbsCurveGL:

PLib::NurbsCurveSP< float, 3 > PLib::NurbsGL PLib::NurbsCurve< float, N > PLib::ObjectGL PLib::ParaCurve< float, N > List of all members.

Public Methods

 NurbsCurveGL ()
 NurbsCurveGL (const NurbsCurvef &nurb)
 NurbsCurveGL (const NurbsCurveGL &nurb)
 NurbsCurveGL (const Vector< HPoint3Df > &P1, const Vector< float > &U1, int degree=3)
 NurbsCurveGL (const Vector< Point3Df > &P1, const Vector< float > &W, const Vector< float > &U1, int degree=3)
void gluNurbs () const
void point (float &u, float &v, int pSize, const Color &colorP, int cp_flag=0) const
NurbsCurveGL & operator= (const NurbsCurveGL &a)
NurbsCurveGL & operator= (const NurbsCurvef &a)
void resetBoundingBox ()
void resetCPoints ()
void resetPolygon ()
void resetKnots ()
ObjectGLcopy ()
int read (ifstream &fin)
int write (ofstream &fout) const
void applyTransform ()
void modifyPoint (float u, float v, float dx, float dy, float dz)
void setSym (int set, int uDir, float x, float y, float z, float w)

Detailed Description

A NURBS curve class with OpenGL interface.

Author:
Philippe Lavoie
Date:
23 September 1997

Definition at line 833 of file nurbsGL.h.


Member Function Documentation

void PLib::NurbsCurveGL::applyTransform   [virtual]
 

apply the local transformation to the curve.

Apply the local transformation to the curve. This is necessary if you want to get the proper position for the control points before doing anymore processing on them.

Author:
Philippe Lavoie
Date:
23 September 1997

Reimplemented from PLib::ObjectGL.

Definition at line 1691 of file nurbsGL.cpp.

References PLib::MatrixRT::scale, and PLib::NurbsCurve< float, N >::transform.

void PLib::NurbsCurveGL::gluNurbs   const [virtual]
 

creates a nurbs curve for OpenGL.

This function calls between a gluBeginCurve/gluEndCurve the proper functions to generate a NURBS curve.

Author:
Philippe Lavoie
Date:
23 September 1997

Implements PLib::NurbsGL.

Definition at line 1602 of file nurbsGL.cpp.

void PLib::NurbsCurveGL::modifyPoint float    u,
float    v,
float    dx,
float    dy,
float    dz
[virtual]
 

Modifies a point on the curve.

Parameters:
u  the u parametric value
v  the v parametric value
dx  the delta value in the $x$-axis direction
dy  the delta value in the $y$-axis direction
dz  the delta value in the $z$-axis direction
Author:
Philippe Lavoie
Date:
7 November 1997

Implements PLib::NurbsGL.

Definition at line 3014 of file nurbsGL.cpp.

NurbsCurveGL & PLib::NurbsCurveGL::operator= const NurbsCurvef &    a
 

Copies another Nurbs Curve GL.

Parameters:
a  the Nurbs curve to copy
Author:
Philippe Lavoie
Date:
6 November 1997

Definition at line 2969 of file nurbsGL.cpp.

NurbsCurveGL & PLib::NurbsCurveGL::operator= const NurbsCurveGL &    a
 

Copies another Nurbs Curve GL.

Parameters:
a  the Nurbs curve to copy
Author:
Philippe Lavoie
Date:
6 November 1997

Definition at line 2954 of file nurbsGL.cpp.

void PLib::NurbsCurveGL::point float &    u,
float &    v,
int    pSize,
const Color   colorP,
int    cp_flag = 0
const [virtual]
 

draws a point at the location C(u).

This function calls between a glBegin/glEnd the proper functions to represent the point which is at C(u) on the curve.

Parameters:
u  the parametric value
v  a dummy variable so the call is the same as with a NURBS surface.
psize  the size of the control points
colorP  the color of the control points
Author:
Philippe Lavoie
Date:
23 September 1997

Implements PLib::NurbsGL.

Definition at line 2068 of file nurbsGL.cpp.

References PLib::NurbsCurve< float, N >::hpointAt.

int PLib::NurbsCurveGL::read ifstream &    fin [virtual]
 

Reads the information from a stream.

Parameters:
fin  the input stream
Returns:
1 on sucess, 0 on failure
Author:
Philippe Lavoie
Date:
19 June 1998

Reimplemented from PLib::NurbsCurveSP< float, 3 >.

Definition at line 3710 of file nurbsGL.cpp.

References PLib::ObjectGL::setName.

void PLib::NurbsCurveGL::resetBoundingBox   [virtual]
 

resets the minP and maxP values of bbox.

Resets the minP and maxP values for the bouding box.

Warning:
Calling this function without a proper curve initialized might result in strange results.
Author:
Philippe Lavoie
Date:
23 September 1997

Reimplemented from PLib::NurbsGL.

Definition at line 1543 of file nurbsGL.cpp.

References PLib::ParaCurve< float, N >::extremum.

void PLib::NurbsCurveGL::resetCPoints   [virtual]
 

reset the control point information.

Reset the control points information stored in cpoints.

Author:
Philippe Lavoie
Date:
23 September 1997

Reimplemented from PLib::NurbsGL.

Definition at line 1790 of file nurbsGL.cpp.

void PLib::NurbsCurveGL::resetKnots   [virtual]
 

Reset the knots information.

Reset the knot information stored in knots.

Author:
Philippe Lavoie
Date:
23 September 1997

Reimplemented from PLib::NurbsGL.

Definition at line 1838 of file nurbsGL.cpp.

References PLib::ParaCurve< float, N >::pointAt.

int PLib::NurbsCurveGL::write ofstream &    fout const [virtual]
 

Writes a NurbsCurveGL to an output stream.

Parameters:
fout  the output stream
Returns:
0 if an error occurs, 1 otherwise
Author:
Philippe Lavoie
Date:
19 June 1998

Reimplemented from PLib::ObjectGL.

Definition at line 3782 of file nurbsGL.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 13:27:00 2003 for NURBS++ by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002