#include <nurbsGL.h>
Inheritance diagram for PLib::NurbsCurveGL:
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 |
NurbsCurveGL & | operator= (const NurbsCurveGL &a) |
NurbsCurveGL & | operator= (const NurbsCurvef &a) |
void | resetBoundingBox () |
void | resetCPoints () |
void | resetPolygon () |
void | resetKnots () |
ObjectGL * | copy () |
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) |
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.
Implements PLib::NurbsGL.
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.
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 |
Implements PLib::NurbsGL.
NurbsCurveGL & PLib::NurbsCurveGL::operator= | ( | const NurbsCurveGL & | a | ) |
Copies another Nurbs Curve GL.
a | the Nurbs curve to copy |
NurbsCurveGL & PLib::NurbsCurveGL::operator= | ( | const NurbsCurvef & | a | ) |
Copies another Nurbs Curve GL.
a | the Nurbs curve to copy |
void PLib::NurbsCurveGL::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::NurbsCurveGL::resetCPoints | ( | ) | [virtual] |
reset the control point information
Reset the control points information stored in cpoints.
Reimplemented from PLib::NurbsGL.
void PLib::NurbsCurveGL::resetKnots | ( | ) | [virtual] |
Reset the knots information.
Reset the knot information stored in knots.
Reimplemented from PLib::NurbsGL.
int PLib::NurbsCurveGL::read | ( | ifstream & | fin | ) | [virtual] |
Reads the information from a stream.
fin | the input stream |
Reimplemented from PLib::NurbsCurveSP< T, N >.
int PLib::NurbsCurveGL::write | ( | ofstream & | fout | ) | const |
Writes a NurbsCurveGL to an output stream.
fout | the output stream |
Reimplemented from PLib::NurbsCurve< T, N >.
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.
Reimplemented from PLib::ObjectGL.
void PLib::NurbsCurveGL::modifyPoint | ( | float | u, | |
float | v, | |||
float | dx, | |||
float | dy, | |||
float | dz | |||
) | [virtual] |
Modifies a point on the curve.
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.