#include <nurbsGL.h>
Inheritance diagram for PLib::HNurbsSurfaceGL:
Public Member Functions | |
HNurbsSurfaceGL () | |
HNurbsSurfaceGL (const NurbsSurfacef &nS) | |
HNurbsSurfaceGL (const HNurbsSurfaceGL &bS) | |
HNurbsSurfaceGL (const HNurbsSurfaceGL *bS) | |
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) |
ObjectGL * | copy () |
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 |
PLib::HNurbsSurfaceGL::HNurbsSurfaceGL | ( | ) |
Default constructor.
PLib::HNurbsSurfaceGL::HNurbsSurfaceGL | ( | const NurbsSurfacef & | nS | ) |
Constructor from a surface.
nS | a Nurbs Surface |
PLib::HNurbsSurfaceGL::HNurbsSurfaceGL | ( | const HNurbsSurfaceGL & | bS | ) |
Copy constructor with patch information.
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 |
PLib::HNurbsSurfaceGL::HNurbsSurfaceGL | ( | const HNurbsSurfaceGL * | bS | ) |
Copy constructor.
bS | a pointer to the object to copy |
void PLib::HNurbsSurfaceGL::decreaseLevelOfDetail | ( | ) |
Activates the patch at a higher level.
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.
Implements PLib::NurbsGL.
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.
u | the U parametric value | |
v | the V parametric value | |
psize | the size of the control points | |
colorP | the color of the control points |
Implements PLib::NurbsGL.
void PLib::HNurbsSurfaceGL::resetBoundingBox | ( | ) | [virtual] |
resets the minP and maxP values of bbox
Resets the minP and maxP values for the bouding box.
Reimplemented from PLib::NurbsGL.
void PLib::HNurbsSurfaceGL::resetCPoints | ( | ) | [virtual] |
Reset the control point information.
Reset the control point information stored in cpoints
Reimplemented from PLib::NurbsGL.
void PLib::HNurbsSurfaceGL::resetPolygon | ( | ) | [virtual] |
Reset the control point information stored in cpoints.
Reimplemented from PLib::NurbsGL.
int PLib::HNurbsSurfaceGL::read | ( | const char * | f | ) | [inline] |
Reads a HNURBS surface from a file.
filename | the filename to read from |
Reimplemented from PLib::HNurbsSurface< T, N >.
int PLib::HNurbsSurfaceGL::write | ( | const char * | f | ) | const [inline] |
write a HNURBS surface to a file
filename | the filename to write to |
Reimplemented from PLib::HNurbsSurface< T, N >.
int PLib::HNurbsSurfaceGL::read | ( | ifstream & | fin | ) | [virtual] |
Reads the information from a stream.
fin | the input stream |
Reimplemented from PLib::HNurbsSurfaceSP< T, N >.
int PLib::HNurbsSurfaceGL::write | ( | ofstream & | fout | ) | const |
Writes a NurbsCurveGL to an output stream.
fout | the output stream |
Reimplemented from PLib::HNurbsSurface< T, N >.
void PLib::HNurbsSurfaceGL::selectHigherLevel | ( | ) |
Activates the next patch at the same levelActivates the previous patch at the same levelActivates the patch at a higher level.
void PLib::HNurbsSurfaceGL::selectLowerLevel | ( | ) |
Activates the patch at a higher level.
void PLib::HNurbsSurfaceGL::selectHighestLevel | ( | ) |
Activates the patch at a higher level.
HNurbsSurfaceSPf * PLib::HNurbsSurfaceGL::addLevel | ( | ) | [virtual] |
Adds a level to the Hierarchical surface.
Reimplemented from PLib::HNurbsSurfaceSP< T, N >.
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.
Reimplemented from PLib::ObjectGL.
void PLib::HNurbsSurfaceGL::modifyPoint | ( | float | u, | |
float | v, | |||
float | dx, | |||
float | dy, | |||
float | dz | |||
) | [virtual] |
Modifies a point on the surface.
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 |
Implements PLib::NurbsGL.
void PLib::HNurbsSurfaceGL::setSym | ( | int | set, | |
int | uDir, | |||
float | x, | |||
float | y, | |||
float | z, | |||
float | w | |||
) | [virtual] |
Sets the symmetry for the control points.
true | 1 if it should be in symmetrical mode |
Implements PLib::NurbsGL.