Main Page | Class Hierarchy | Class List | File List | Class Members

PLib::NurbsCurveGL Class Reference

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

#include <nurbsGL.h>

Inheritance diagram for PLib::NurbsCurveGL:

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

Public Member Functions

 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
NurbsCurveGLoperator= (const NurbsCurveGL &a)
NurbsCurveGLoperator= (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


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.

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.

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.

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

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

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.

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< T, N >.

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.

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.

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.

int PLib::NurbsCurveGL::write ofstream &  fout  )  const
 

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::NurbsCurve< T, N >.


The documentation for this class was generated from the following files:
Generated on Wed Aug 18 07:07:38 2004 for NURBS++ by doxygen 1.3.7