#include <nurbsGL.h>
Inheritance diagram for PLib::NurbsSurfaceGL:
Public Methods | |
NurbsSurfaceGL () | |
NurbsSurfaceGL (const NurbsSurfacef &nS) | |
NurbsSurfaceGL (const NurbsSurfaceGL &nS) | |
NurbsSurfaceGL (int DegU, int DegV, const Vector< float > &Uk, const Vector< float > &Vk, const Matrix< HPoint3Df > &Cp) | |
NurbsSurfaceGL (int DegU, int DegV, Vector< float > &Uk, Vector< float > &Vk, Matrix< Point3Df > &Cp, Matrix< float > &W) | |
~NurbsSurfaceGL () | |
void | gluNurbs () const |
void | point (float &u, float &v, int pSize, const Color &colorP, int cp_flag=0) const |
virtual NurbsSurfaceGL & | operator= (const NurbsSurfaceGL &a) |
virtual NurbsSurfaceGL & | operator= (const NurbsSurfacef &a) |
void | resetBoundingBox () |
void | resetCPoints () |
void | resetPolygon () |
void | resetKnots () |
int | read (ifstream &fin) |
int | write (ofstream &fout) const |
int | writeRIB (ofstream &fout) const |
int | writePOVRAY (ofstream &fout) const |
ObjectGL * | copy () |
void | applyTransform () |
void | modifyPoint (float u, float v, float dx, float dy, float dz) |
void | setImage (GLubyte *img, GLint w, GLint h) |
void | setSym (int set, int uDir, float x, float y, float z, float w) |
Public Attributes | |
std::list< NurbsCurve_2Df * > | trimmedCurves |
Protected Attributes | |
GLubyte * | image |
GLint | imgW |
GLint | imgH |
Definition at line 871 of file nurbsGL.h.
|
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. Definition at line 1717 of file nurbsGL.cpp. References PLib::MatrixRT::scale, and PLib::NurbsSurface< float, N >::transform. |
|
creates a nurbs surface for OpenGL.
This function calls between a gluBeginSurface/gluEndSurface the proper functions to generate a NURBS surface.
Implements PLib::NurbsGL. Definition at line 2147 of file nurbsGL.cpp. References PLib::NurbsSurface< float, N >::degU, PLib::NurbsSurface< float, N >::degV, PLib::NurbsSurface< float, N >::isoCurveU, PLib::NurbsSurface< float, N >::isoCurveV, PLib::NurbsSurface< float, N >::P, PLib::NurbsSurface< float, N >::U, and PLib::NurbsSurface< float, N >::V. |
|
Modifies a point on the surface.
Implements PLib::NurbsGL. Definition at line 3033 of file nurbsGL.cpp. References PLib::NurbsSurface< float, N >::knotU, PLib::NurbsSurface< float, N >::knotV, and PLib::NurbsSurface< float, N >::movePoint. |
|
Copies another Nurbs Curve GL.
Definition at line 2997 of file nurbsGL.cpp. |
|
Copies another Nurbs Curve GL.
Definition at line 2982 of file nurbsGL.cpp. |
|
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 surface.
Implements PLib::NurbsGL. Definition at line 2505 of file nurbsGL.cpp. References PLib::ParaSurface< float, N >::hpointAt, PLib::NurbsSurface< float, N >::isoCurveU, PLib::NurbsSurface< float, N >::isoCurveV, PLib::NurbsSurface< float, N >::U, and PLib::NurbsSurface< float, N >::V. |
|
Reads the information from a stream.
Reimplemented from PLib::NurbsSurfaceSP< float, 3 >. Definition at line 3734 of file nurbsGL.cpp. References PLib::ObjectGL::setName. |
|
resets the minP and maxP values of bbox.
Resets the minP and maxP values for the bouding box.
Reimplemented from PLib::NurbsGL. Definition at line 1563 of file nurbsGL.cpp. References PLib::ParaSurface< float, N >::extremum. |
|
Reset the control point information.
Reset the control point information stored in cpoints.
Reimplemented from PLib::NurbsGL. Definition at line 1878 of file nurbsGL.cpp. References PLib::NurbsSurface< float, N >::degU, PLib::NurbsSurface< float, N >::degV, PLib::ObjectGL::ObjectGL, and PLib::NurbsSurface< float, N >::P. |
|
reset the knots information.
Reset the knots information stored in knots.
Reimplemented from PLib::NurbsGL. Definition at line 2004 of file nurbsGL.cpp. References PLib::NurbsSurface< float, N >::P, PLib::ParaSurface< float, N >::pointAt, PLib::NurbsSurface< float, N >::U, and PLib::NurbsSurface< float, N >::V. |
|
attach an image to a surface.
Attach an image to a surface. The image must contain the red, green and blue component in succesive GLubyte of data. The image data must be sent row wise. OpenGL only uses images which are 2^n pixels in width or height. If the image is not of the proper size, it will be padded to be acceptable by OpenGL. If you want to center the image, you have to provide an already centered image. The image data is reversed so that it shows upside up when mapped to a NURBS surface. The img data is copied into a new vector so it is safe to delete it once it has been passed to this routine.
Definition at line 3369 of file nurbsGL.cpp. |
|
Sets the symmetry for the control points.
Implements PLib::NurbsGL. Definition at line 3300 of file nurbsGL.cpp. References PLib::NurbsSurface< float, N >::ctrlPnts, and PLib::ObjectGL::ObjectGL. |
|
Writes a NurbsCurveGL to an output stream.
Reimplemented from PLib::ObjectGL. Definition at line 3818 of file nurbsGL.cpp. |