Main Page   Class Hierarchy   Compound List   File List   Compound Members  

PLib::HNurbsSurfaceGL Class Reference

a HNURBS surface class for OpenGL. More...

#include <nurbsGL.h>

Inheritance diagram for PLib::HNurbsSurfaceGL:

PLib::HNurbsSurfaceSP< float, 3 > PLib::NurbsGL PLib::HNurbsSurface< float, N > PLib::ObjectGL PLib::NurbsSurface< float, N > PLib::ParaSurface< float, N > List of all members.

Public Methods

 HNurbsSurfaceGL ()
 HNurbsSurfaceGL (const NurbsSurfacef &nS)
 HNurbsSurfaceGL (const HNurbsSurfaceGL &bS)
 HNurbsSurfaceGL (const HNurbsSurfaceGL *bS)
virtual ~HNurbsSurfaceGL ()
void setLevelOfDetail (int l)
int levelOfDetail () const
void increaseLevelOfDetail ()
void decreaseLevelOfDetail ()
void highestLevelOfDetail ()
int maxLevelOfDetail ()
void gluNurbs () const
void point (float &u, float &v, int pSize, const Color &colorP, int cp_flag=0) const
void resetBoundingBox ()
void resetCPoints ()
void resetPolygon ()
void resetKnots ()
int read (const char *f)
int write (const char *f) const
int read (ifstream &fin)
int write (ofstream &fout) const
int writeRIB (ofstream &fout) const
int writePOVRAY (ofstream &fout) const
void selectBasePatch ()
void selectNextPatch ()
void selectPrevPatch ()
void selectHigherLevel ()
void selectLowerLevel ()
void selectHighestLevel ()
int editLevel ()
void updateUpToLOD ()
HNurbsSurfaceSPf * addLevel ()
void applyTransform ()
void modifyPoint (float u, float v, float dx, float dy, float dz)
ObjectGLcopy ()
void setSym (int set, int uDir, float x, float y, float z, float w)
void axis (int i, int j, Point3Df &xaxis, Point3Df &yaxis, Point3Df &zaxis) const

Protected Attributes

int lod
HNurbsSurfaceGL * activePatch

Detailed Description

a HNURBS surface class for OpenGL.

Author:
Philippe Lavoie
Date:
23 September 1997

Definition at line 929 of file nurbsGL.h.


Constructor & Destructor Documentation

PLib::HNurbsSurfaceGL::HNurbsSurfaceGL  
 

Default constructor.

Author:
Philippe Lavoie
Date:
7 November 1997

Definition at line 3097 of file nurbsGL.cpp.

References PLib::HNurbsSurface< float, N >::maxLevel.

Referenced by addLevel, decreaseLevelOfDetail, gluNurbs, selectHigherLevel, selectHighestLevel, and selectLowerLevel.

PLib::HNurbsSurfaceGL::HNurbsSurfaceGL const NurbsSurfacef &    nS
 

Constructor from a surface.

Parameters:
nS  a Nurbs Surface
Author:
Philippe Lavoie
Date:
7 November 1997

Definition at line 3112 of file nurbsGL.cpp.

References PLib::HNurbsSurface< float, N >::maxLevel.

PLib::HNurbsSurfaceGL::HNurbsSurfaceGL const HNurbsSurfaceGL &    bS
 

Copy constructor with patch information.

Parameters:
bS  the object to copy
us  the start of the U parametric patch
ue  the end of the U parametric patch
vs  the start of the V parametric patch
ue  the end of the V parametric patch
Author:
Philippe Lavoie
Date:
7 November 1997

Definition at line 3131 of file nurbsGL.cpp.

References PLib::HNurbsSurface< float, N >::maxLevel.

PLib::HNurbsSurfaceGL::HNurbsSurfaceGL const HNurbsSurfaceGL *    bS
 

Copy constructor.

Parameters:
bS  a pointer to the object to copy
Author:
Philippe Lavoie
Date:
7 November 1997

Definition at line 3146 of file nurbsGL.cpp.

References PLib::HNurbsSurface< float, N >::maxLevel.


Member Function Documentation

HNurbsSurfaceSPf * PLib::HNurbsSurfaceGL::addLevel   [virtual]
 

Adds a level to the Hierarchical surface.

Author:
Philippe Lavoie
Date:
28 January 1998

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

Definition at line 3159 of file nurbsGL.cpp.

References HNurbsSurfaceGL.

void PLib::HNurbsSurfaceGL::applyTransform   [virtual]
 

apply the local transformation to the surface.

Apply the local transformation to the surface. 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:
7 November 1997

Reimplemented from PLib::ObjectGL.

Definition at line 3070 of file nurbsGL.cpp.

References PLib::NurbsSurface< float, N >::P, PLib::HNurbsSurface< float, N >::scale, PLib::NurbsSurface< float, N >::transform, and PLib::HNurbsSurfaceSP< float, 3 >::updateLevels.

void PLib::HNurbsSurfaceGL::decreaseLevelOfDetail  
 

Activates the patch at a higher level.

Author:
Philippe Lavoie
Date:
3 November 1997

Definition at line 2879 of file nurbsGL.cpp.

References HNurbsSurfaceGL.

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

creates a HNURBS surface for OpenGL.

This draws a HNURBS. Presently only isocurves are drawn to represent the surface.

Author:
Philippe Lavoie
Date:
23 September 1997

Implements PLib::NurbsGL.

Definition at line 2439 of file nurbsGL.cpp.

References HNurbsSurfaceGL, and PLib::HNurbsSurface< float, N >::maxLevel.

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

Modifies a point on the surface.

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 3052 of file nurbsGL.cpp.

References resetCPoints.

void PLib::HNurbsSurfaceGL::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 S(u,v) on the hierarchical surface.

Parameters:
u  the U parametric value
v  the V parametric value
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 2556 of file nurbsGL.cpp.

References PLib::HNurbsSurface< float, N >::hpointAt, PLib::HNurbsSurface< float, N >::isoCurveU, PLib::HNurbsSurface< float, N >::isoCurveV, PLib::ObjectGL::ObjectGL, PLib::NurbsSurface< float, N >::U, and PLib::NurbsSurface< float, N >::V.

int PLib::HNurbsSurfaceGL::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::HNurbsSurfaceSP< float, 3 >.

Definition at line 3758 of file nurbsGL.cpp.

References PLib::ObjectGL::setName.

int PLib::HNurbsSurfaceGL::read const char *    f [inline, virtual]
 

Reads the information from a stream.

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

Reimplemented from PLib::ObjectGL.

Definition at line 956 of file nurbsGL.h.

void PLib::HNurbsSurfaceGL::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 surface initialized might result in strange results.
Author:
Philippe Lavoie
Date:
23 September 1997

Reimplemented from PLib::NurbsGL.

Definition at line 1583 of file nurbsGL.cpp.

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

void PLib::HNurbsSurfaceGL::resetCPoints   [virtual]
 

Reset the control point information.

Reset the control point information stored in cpoints

Author:
Philippe Lavoie
Date:
23 September 1997

Reimplemented from PLib::NurbsGL.

Definition at line 1937 of file nurbsGL.cpp.

References PLib::NurbsSurface< float, N >::degU, PLib::NurbsSurface< float, N >::degV, and PLib::ObjectGL::ObjectGL.

Referenced by modifyPoint.

void PLib::HNurbsSurfaceGL::resetPolygon   [virtual]
 

Reset the control point information stored in cpoints.

Author:
Philippe Lavoie
Date:
29 January 1998

Reimplemented from PLib::NurbsGL.

Definition at line 3174 of file nurbsGL.cpp.

void PLib::HNurbsSurfaceGL::selectHigherLevel  
 

Activates the next patch at the same level Activates the previous patch at the same level Activates the patch at a higher level.

Author:
Philippe Lavoie
Date:
3 November 1997

Definition at line 2838 of file nurbsGL.cpp.

References HNurbsSurfaceGL.

void PLib::HNurbsSurfaceGL::selectHighestLevel  
 

Activates the patch at a higher level.

Author:
Philippe Lavoie
Date:
28 January 1998

Definition at line 2852 of file nurbsGL.cpp.

References HNurbsSurfaceGL.

void PLib::HNurbsSurfaceGL::selectLowerLevel  
 

Activates the patch at a higher level.

Author:
Philippe Lavoie
Date:
3 November 1997

Definition at line 2866 of file nurbsGL.cpp.

References HNurbsSurfaceGL.

void PLib::HNurbsSurfaceGL::setSym int    set,
int    uDir,
float    x,
float    y,
float    z,
float    w
[virtual]
 

Sets the symmetry for the control points.

Parameters:
true  1 if it should be in symmetrical mode
Author:
Philippe Lavoie
Date:
29 January 1998

Implements PLib::NurbsGL.

Definition at line 3246 of file nurbsGL.cpp.

References PLib::ObjectGL::ObjectGL.

int PLib::HNurbsSurfaceGL::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 3800 of file nurbsGL.cpp.

int PLib::HNurbsSurfaceGL::write const char *    f const [inline, virtual]
 

Writes a ObjectGL to a file.

Parameters:
filename  the filename to write to.
Returns:
0 if an error occurs, 1 otherwise
Author:
Philippe Lavoie
Date:
19 June 1998

Reimplemented from PLib::ObjectGL.

Definition at line 957 of file nurbsGL.h.


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