#include <nurbsS.hh>
Inheritance diagram for PLib::NurbsSurface::
Public Methods | |
NurbsSurface () | |
NurbsSurface (const NurbsSurface< T, N > &nS) | |
NurbsSurface (int DegU, int DegV, const Vector< T > &Uk, const Vector< T > &Vk, const Matrix< HPoint_nD< T, N > > &Cp) | |
NurbsSurface (int DegU, int DegV, Vector< T > &Uk, Vector< T > &Vk, Matrix< Point_nD< T, N > > &Cp, Matrix< T > &W) | |
virtual | ~NurbsSurface () |
const Vector< T > & | knotU () const |
const Vector< T > & | knotV () const |
T | knotU (int i) const |
T | knotV (int i) const |
const Matrix< HPoint_nD< T, N > > & | ctrlPnts () const |
const HPoint_nD< T, N > | ctrlPnts (int i, int j) const |
int | degreeU () const |
int | degreeV () const |
virtual NurbsSurface< T, N > & | operator= (const NurbsSurface< T, N > &) |
void | resize (int Pu, int Pv, int DegU, int DegV) |
virtual void | resizeKeep (int Pu, int Pv, int DegU, int DegV) |
int | ok () |
virtual HPoint_nD< T, N > | operator() (T u, T v) const |
void | basisFuns (T u, T v, int spanU, int spanV, Vector< T > &Nu, Vector< T > &Nv) const |
void | basisFunsU (T u, int span, Vector< T > &N) const |
void | basisFunsV (T u, int span, Vector< T > &N) const |
void | dersBasisFuns (T u, T v, int dU, int dV, int uspan, int vspan, Matrix< T > &Niku, Matrix< T > &Njkv) const |
void | deriveAt (T u, T v, int d, Matrix< Point_nD< T, N > > &skl) const |
void | deriveAtH (T u, T v, int d, Matrix< HPoint_nD< T, N > > &skl) const |
Point_nD< T, N > | normal (T u, T v) const |
void | globalInterp (const Matrix< Point_nD< T, N > > &Q, int pU, int pV) |
void | globalInterpH (const Matrix< HPoint_nD< T, N > > &Q, int pU, int pV) |
void | globalInterpClosedU (const Matrix< Point_nD< T, N > > &Q, int pU, int pV) |
void | globalInterpClosedUH (const Matrix< HPoint_nD< T, N > > &Q, int pU, int pV) |
void | leastSquares (const Matrix< Point_nD< T, N > > &Q, int pU, int pV, int nU, int nV) |
void | leastSquaresClosedU (const Matrix< Point_nD< T, N > > &Q, int pU, int pV, int nU, int nV) |
int | skinV (NurbsCurveArray< T, N > &ca, int degV) |
int | skinU (NurbsCurveArray< T, N > &ca, int degU) |
void | sweep (const NurbsCurve< T, N > &t, const NurbsCurve< T, N > &C, const NurbsCurve< T, N > &Sv, int K, int useAy=0, int invAz=0) |
void | sweep (const NurbsCurve< T, N > &t, const NurbsCurve< T, N > &C, int K, int useAy=0, int invAz=0) |
void | makeFromRevolution (const NurbsCurve< T, N > &profile, const Point_nD< T, N > &S, const Point_nD< T, N > &T, double theta) |
void | makeFromRevolution (const NurbsCurve< T, N > &profile, const Point_nD< T, N > &S, const Point_nD< T, N > &T) |
void | makeFromRevolution (const NurbsCurve< T, N > &profile) |
void | makeSphere (const Point_nD< T, N > &O, T r) |
void | makeTorus (const Point_nD< T, N > &O, T R, T r) |
void | degreeElevate (int tU, int tV) |
virtual void | degreeElevateU (int tU) |
virtual void | degreeElevateV (int tV) |
int | decompose (NurbsSurfaceArray< T, N > &Sa) const |
void | findSpan (T u, T v, int &spanU, int &spanV) const |
int | findSpanU (T u) const |
int | findSpanV (T v) const |
int | findMultU (int r) const |
int | findMultV (int r) const |
virtual void | refineKnots (const Vector< T > &nU, const Vector< T > &nV) |
virtual void | refineKnotU (const Vector< T > &X) |
virtual void | refineKnotV (const Vector< T > &X) |
virtual void | mergeKnots (const Vector< T > &nU, const Vector< T > &nV) |
virtual void | mergeKnotU (const Vector< T > &X) |
virtual void | mergeKnotV (const Vector< T > &X) |
T | area (T eps=0.001, int n=100) const |
T | areaIn (T us, T ue, T vs, T ve, T eps, int n) const |
T | areaF (T u, T v) const |
void | isoCurveU (T u, NurbsCurve< T, N > &c) const |
void | isoCurveV (T v, NurbsCurve< T, N > &c) const |
int | read (const char *filename) |
int | write (const char *filename) const |
virtual int | read (ifstream &fin) |
int | write (ofstream &fout) const |
int | writeVRML (const char *filename, const Color &color, int Nu, int Nv, T u_s, T u_e, T v_s, T v_e) const |
int | writeVRML (ostream &fout, const Color &color, int Nu, int Nv, T u_s, T u_e, T v_s, T v_e) const |
int | writeVRML97 (const char *filename, const Color &color, int Nu, int Nv, T u_s, T u_e, T v_s, T v_e) const |
int | writeVRML97 (ostream &fout, const Color &color, int Nu, int Nv, T u_s, T u_e, T v_s, T v_e) const |
ostream & | print (ostream &os) const |
int | writeVRML (const char *filename, const Color &color=whiteColor, int Nu=20, int Nv=20) const |
int | writeVRML (ostream &fout, const Color &color=whiteColor, int Nu=20, int Nv=20) const |
int | writeVRML97 (const char *filename, const Color &color=whiteColor, int Nu=20, int Nv=20) const |
int | writeVRML97 (ostream &fout, const Color &color=whiteColor, int Nu=20, int Nv=20) const |
int | writePOVRAY (ostream &povray, int patch_type=1, double flatness=0.01, int num_u_steps=8, int num_v_steps=8) const |
int | writePOVRAY (T, ostream &povray, const Color &color=Color(250, 250, 250), int smooth=0, T ambient=0.2, T diffuse=0.6) const |
int | writePOVRAY (const char *filename, const Color &color, const Point_nD< T, N > &view, const Point_nD< T, N > &up, int patch_type=1, double flatness=0.01, int num_u_steps=8, int num_v_steps=8) const |
int | writePOVRAY (T tolerance, const char *filename, const Color &color, const Point_nD< T, N > &view, const Point_nD< T, N > &up, int smooth=0, T ambient=0.2, T diffuse=0.6) const |
int | writeRIB (ostream &rib) const |
int | writeRIB (const char *filename, const Color &color, const Point_nD< T, N > &view) const |
void | tesselate (T tolerance, BasicList< Point_nD< T, N > > &points, BasicList< int > &connect, BasicList< Point_nD< T, N > > *normal=0) const |
int | writePS (const char *, int nu, int nv, const Point_nD< T, N > &camera, const Point_nD< T, N > &lookAt, int cp=0, T magFact=T(-1), T dash=T(5)) const |
int | writePSp (const char *, int nu, int nv, const Point_nD< T, N > &camera, const Point_nD< T, N > &lookAt, const Vector< Point_nD< T, N > > &, const Vector< Point_nD< T, N > > &, int cp=0, T magFact=0.0, T dash=5.0) const |
int | writeOOGL (const char *filename, T fDu, T fDv, T fBu=0.0, T fBv=0.0, T fEu=1.0, T fEv=1.0, bool bDRawCP=false) const |
int | writeOOGL (const char *filename) const |
int | writeDisplayQUADMESH (const char *filename, int iNu=100, int iNv=100, const Color &color=blueColor, T fA=.25, T fO=0.2) const |
void | transform (const MatrixRT< T > &A) |
void | modCP (int i, int j, const HPoint_nD< T, N > &p) |
void | modCPby (int i, int j, const HPoint_nD< T, N > &p) |
T & | modU (int i) |
T | modU (int i) const |
T & | modV (int i) |
T | modV (int i) const |
void | modKnotU (const Vector< T > &uKnot) |
void | modKnotV (const Vector< T > &vKnot) |
int | movePoint (T u, T v, const Point_nD< T, N > &delta) |
int | movePoint (const Vector< T > &ur, const Vector< T > &vr, const Vector< Point_nD< T, N > > &D, const Vector_INT &Du, const Vector_INT &Dv) |
int | movePoint (const Vector< T > &ur, const Vector< T > &vr, const Vector< Point_nD< T, N > > &D, const Vector_INT &Du, const Vector_INT &Dv, const Vector_INT &Dk, const Vector_INT &Dl) |
int | movePoint (const Vector< T > &ur, const Vector< T > &vr, const Vector< Point_nD< T, N > > &D, const Vector_INT &Du, const Vector_INT &Dv, const Vector_INT &Dk, const Vector_INT &Dl, const BasicArray< Coordinate > &fixCP) |
NurbsSurface< T, N > & | transpose (void) |
Protected Attributes | |
Vector< T > | U |
Vector< T > | V |
Matrix< HPoint_nD< T, N > > | P |
int | degU |
int | degV |
Friends | |
void | gordonSurface (NurbsCurveArray< T, N > &lU, NurbsCurveArray< T, N > &lV, const Matrix< Point_nD< T, N > > &intersections, NurbsSurface< T, N > &gS) |
void | globalSurfInterpXY (const Matrix< Point_nD< T, N > > &Q, int pU, int pV, NurbsSurface< T, N > &S) |
void | globalSurfInterpXY (const Matrix< Point_nD< T, N > > &Q, int pU, int pV, NurbsSurface< T, N > &S, const Vector< T > &uk, const Vector< T > &vk) |
void | globalSurfApprox (const Matrix< Point_nD< T, N > > &Q, int pU, int pV, NurbsSurface< T, N > &S, double error) |
Related Functions | |
(Note that these are not member functions.) | |
int | surfMeshParams (const Matrix< Point_nD< T, N > > &Q, Vector< T > &uk, Vector< T > &vl) |
int | surfMeshParamsH (const Matrix< HPoint_nD< T, N > > &Q, Vector< T > &uk, Vector< T > &vl) |
The NURBS surface is composed of points in homogenous space. It can have any degree in both the u and the v direction.
|
Default constructor.
|
|
the copy constructor.
|
|
constructor with points in homogenous space.
|
|
constructor with points in 3D.
|
|
Computes the area of the surface.
Computes an approximation of the area of the surface using a numerical automatic integrator. That integrator uses a Chebyshev Series Expansion to perform its approximation. This is why you can change the value n which sets the number of elements in the series. The method is simple, integrate between each span. This is necessary in case the tangant of a point at u_i is undefined. Add the result and return this as the approximation.
|
|
area needs to integrate a function over an interval to determine the area of the NURBS surface. Well, this is the function.
|
|
Computes the area of the surface inside [u_s,u_e].
Computes an approximation of the area of the surface using a numerical automatic integrator. The area is computed for the range [u_s,u_e] That integrator uses a Chebyshev Series Expansion to perform its approximation. This is why you can change the value n which sets the number of elements in the series. The method is similar to the one used by area excepted that it needs to check for the range.
|
|
Find the non-zero basis functions in the U and V direction.
|
|
Finds the non-zero basis function in the U direction.
|
|
Finds the non-zero basis function in the V direction.
|
|
Decompose the surface into Bézier patches.
This function decomposes the curve into an array of homogenous Bézier patches.
|
|
Degree elevate the surface in the U and V direction.
|
|
Degree elevate the surface in the U direction.
Reimplemented in PLib::NurbsSurfaceSP, and PLib::NurbsSurfaceSP< float, 3 >. |
|
Degree elevate the surface in the V direction.
Reimplemented in PLib::NurbsSurfaceSP, and PLib::NurbsSurfaceSP< float, 3 >. |
|
Computes the point and the derivatives of degree d and below at (u,v).
Computes the matrix of derivatives at u,v . The value of skl(k,l) represents the derivative of the surface S(u,v) with respect to u, k times and to v, l times.
Reimplemented from PLib::ParaSurface. |
|
computes the point and the derivatives of degree d and below at (u,v).
Computes the matrix of derivatives at u,v . The value of skl(k,l) represents the derivative of the surface S(u,v) with respect to u k times and to $v$ $l$ times.
|
|
Compute the derivatives functions at u,v of the basis functions of the NURBS surface \relates NurbsCurve, nurbsDersBasisFuns.
|
|
Finds the multiplicity of a knot in the U knot.
|
|
finds the multiplicity of a knot in the V knot.
|
|
finds the span in the U and V direction.
Finds the span in the U and V direction. The spanU is the index k for which the parameter u is valid in the [u_k,u_{k+1}] range. The spanV is the index k for which the parameter v is valid in the [v_k,v_{k+1}] range.
|
|
finds the span in the U direction.
Finds the span in the U direction. The span is the index k for which the parameter u is valid in the [u_k,u_{k+1}] range.
|
|
finds the span in the V direction.
Finds the span in the V direction. The span is the index k for which the parameter v is valid in the [v_k,v_{k+1}] range.
|
|
Generates a surface using global interpolation.
|
|
Generates a closed surface using global interpolation.
Generates a NURBS surface using global interpolation. In the u direction the curve will be closed and with C(pU-1) continuity. Each column in Q indicates the points for a closed curve in the u direction. First and last point have to be equal.
|
|
Generates a surface using global interpolation.
Generates a NURBS surface using global interpolation. In the u direction the curve will be closed and with C(pU-1) continuity. Each column in Q indicates the points for a closed curve in the u direction. First and last point have to be equal.
|
|
Generates a surface using global interpolation with homogenous points.
|
|
Generates an iso curve in the U direction.
Generates an iso-parametric curve which goes through the parametric value u along the U direction.
|
|
Generates an iso curve in the V direction.
Generates an iso-parametric curve which goes through the parametric value v along the V direction.
|
|
generates a surface using global least squares approximation.
|
|
Generates a closed surface using global least squares approximation.
Generates a NURBS surface using global least squares approximation. This will be closed in the u direction and open in the v direction. At u=0("="1) the surface will have C(pU-1) continuity in the u direction.
|
|
Generates a surface of revolution.
Generates a surface of revolution of a profile around the z axis.
|
|
Generates a surface of revolution.
Generates a surface of revolution of a profile around an arbitrary axis (specified by a starting point S and a tangent T).
|
|
Generates a surface of revolution.
Generates a surface of revolution of a profile around an arbitrary axis (specified by a starting point S and a tangent T) with a certain angle. The angle is specified in radians.
|
|
Generates a sphere.
The NURBS surface is now a sphere of radius r located at O.
|
|
Generates a torus.
The NURBS surface is now a torus with major radius R, minor radius r and located at O. The torus goes around the z-axis. This routine is an adaptation of a routine created by John W. Peterson.
|
|
merges a U and V knot vector with the surface knot vectors.
Reimplemented in PLib::HNurbsSurfaceSP, and PLib::NurbsSurfaceSP. |
|
merges the U knot vector with another one.
Reimplemented in PLib::HNurbsSurfaceSP, and PLib::NurbsSurfaceSP. |
|
merges the V knot vector with another one.
Reimplemented in PLib::HNurbsSurfaceSP, and PLib::NurbsSurfaceSP. |
|
|
|
|
|
Moves a point with some constraint.
This will modify the NURBS surface by respecting a certain number of constraints. u_r and v_r specifies the parameters on which the constraints should be applied. The constraint are defined by $D_i^{(k,l)}(u,v)$ which requires 5 vectors to fully qualify. D specifies the value of the constraint and Du and Dv are used to specify on which parameter the constraint is applied and Dk and Dl specify the partial degree of the constraint. A second constraint fixCP consists of specifying which control points can not be moved by the routine. The values in D should be ordered in respect with i,k and l. ur and vr should be in an increasing order.
|
|
Moves a point with some constraint.
This will modify the NURBS surface by respecting a certain number of constraints. u_r and v_r specifies the parameters on which the constraints should be applied. The constraint are defined by D_i^{(k,l)}(u,v) which requires 5 vectors to fully qualify. D specifies the value of the constraint and Du and Dv are used to specify on which parameter the constraint is applied and Dk and Dl specify the partial degree of the constraint. The values in D should be ordered in respect with i,k and l. ur and vr should be in an increasing order.
|
|
Moves a point with some constraint.
This will modify the NURBS surface by respecting a certain number of constraints. u_r and v_r specifies the parameters on which the constraints should be applied. The constraint are defined by D_i(u,v) which requires 3 vectors to fully qualify. $D$ specifies the value of the constraint and Du and Dv are used to specify on which parameter the constraint is applied. ur and vr should be in an increasing order.
|
|
Moves a point on the surface.
This moves the point s(u,v) by delta.
|
|
Computes the normal of the surface at (u,v).
|
|
Determines if the surface is valid.
Determines if the surface is valid. The routine only verifies if the number of control points in the U and V direction matches the area of the U and V knot vectors.
|
|
Returns the point on the surface at u,v.
Returns the point on the surface at u,v
Reimplemented from PLib::ParaSurface. Reimplemented in PLib::HNurbsSurface. |
|
NurbsSurface<T,N> assignment.
Reimplemented in PLib::NurbsSurfaceSP. |
|
Sends the NURBS Surface to ostream for display.
|
|
Read a surface from an input stream.
Reimplemented in PLib::HNurbsSurface, PLib::HNurbsSurfaceSP, PLib::NurbsSurfaceGL, PLib::HNurbsSurfaceGL, PLib::NurbsSurfaceSP, PLib::HNurbsSurface< float, N >, PLib::HNurbsSurfaceSP< float, 3 >, and PLib::NurbsSurfaceSP< float, 3 >. |
|
read a surface from a file.
Reimplemented in PLib::HNurbsSurface, PLib::HNurbsSurfaceGL, and PLib::HNurbsSurface< float, N >. |
|
Refine both knot vectors.
Reimplemented in PLib::HNurbsSurface, PLib::HNurbsSurfaceSP, and PLib::NurbsSurfaceSP. |
|
Refines the U knot vector.
Reimplemented in PLib::HNurbsSurface, PLib::HNurbsSurfaceSP, and PLib::NurbsSurfaceSP. |
|
Refines the V knot vector.
Reimplemented in PLib::HNurbsSurface, PLib::HNurbsSurfaceSP, and PLib::NurbsSurfaceSP. |
|
Resize the surface.
Resize the surface. Proper values must be assigned once this function has been called since the resize operator is destructive.
|
|
Resize the surface while keeping the old values.
Reimplemented in PLib::HNurbsSurfaceSP, PLib::NurbsSurfaceSP, PLib::HNurbsSurfaceSP< float, 3 >, and PLib::NurbsSurfaceSP< float, 3 >. |
|
Generates a NURBS surface from skinning.
The NURBS surface is generates from skinning. The skinning is performed in the U direction.
|
|
Generates a NURBS surface from skinning.
The NURBS surface is generated from skinning. The skinning is performed in the V direction.
|
|
Generates a surface by sweeping a curve along a trajectory.
Sweeping consists of creating a surface by moving a curve through a trajectory. The method uses here consists of using skinning of $K$ instances of the curve C(u) along T(u). The K value should be viewed as a minimum. The cross-sectional curve C(u) should lie on the xz-plane. It follows the trajectory curve T(u) along its y-axis. You might have to play with the useAy and invAz variables to obtain a satisfactory result for the sweep operation. This is either because there is an error in the code or because it is the way it is supposed to work.
|
|
Generates a surface by sweeping a curve along a trajectory.
Sweeping consists of creating a surface by moving a curve profile through a trajectory. The method uses here consists of using skinning of K instances of the curve C(u) along T(u). The K value should be viewed as the minimum number of sections required. The profile curve C(u) should lie on the xz-plane. It follows the trajectory curve T(u) along its y-axis. The scaling function is used to modify the shape of the curve profile while it's being swept. It can scale in any of the 4 dimensions to obtain the desired effects on the profile. See A10.1 on page 476 of the NURBS book for more details about the implementation. You might have to play with the useAy and invAz variables to obtain a satisfactory result for the sweep operation. This is either because there is an error in the code or because it is the way it is supposed to work.
|
|
Generates a list of triangles for a surface.
This function is deprecated, please use the NurbsSubSurface class which implements everything that this function was suppose to do.
|
|
Performs geometrical modifications.
Each control points will be modified by a rotation-translation matrix.
|
|
Transpose the U and V coordinates of a surface.
Transpose the U and V coordinates of a surface. After this operation the (u,v) points correspond to (v,u).
|
|
Write a surface to a file stream.
Reimplemented in PLib::HNurbsSurface, PLib::NurbsSurfaceGL, and PLib::HNurbsSurfaceGL. |
|
Write a surface to a file.
Reimplemented in PLib::HNurbsSurface, and PLib::HNurbsSurfaceGL. |
|
Write the NURBS surface to a mesh file.
This function writes a surface in QUADMESH ascii format to interface with Display (Copyright 1993,1994,1995 David MacDonald, McConnell Brain Imaging Centre), Montreal Neurological Institute, McGill University.
|
|
Write the NURBS surface to a OOGL mesh file.
Writes a OOGL bezier file which represents the NURBS surface decomposed into its Bezier patches.
|
|
Write the NURBS surface to a OOGL mesh file.
Writes a OOGL mesh file which represents the surface for the parametric space [fBu,fEu] and [fBv,fEv]. It does not optimize the number of points required to represent the surface.
|
|
Writes a set of povray bicubic patches.
|
|
Writes a set of povray bicubic patches.
|
|
Writes the surface as a mesh of triangles.
Writes the surface as a mesh of triangles. You might have to change the values for the tolerance to get exactly what you're looking for.
|
|
Writes a set of povray bicubic patches to the ostream.
|
|
Writes a post-script file representing the curve.
|
|
writes a post-script file representing the curve.
Writes the curve in the postscript format to a file, it also draws the points defined in points with their associated vectors if vector is used.
|
|
Writes a NuPatch for render man.
Writes a file whith follows the RIB protocol of RenderMan. It generates a file which views the whole object. The material used for rendering is plastic.
|
|
Writes a NuPatch for render man.
Writes a stream which is compatible with Render Man specifications of a NURBS surface.
|
|
Write the NURBS surface to a VRML file.
Writes a VRML file which represents the surface for the parametric space [uS,uE] and [vS,vE]. It does not optimize the number of points required to represent the surface.
Reimplemented from PLib::ParaSurface. |
|
Write the NURBS surface to a VRML file.
Writes a VRML file which represents the surface for the parametric space [uS,uE] and [vS,vE]. It does not optimize the number of points required to represent the surface.
Reimplemented from PLib::ParaSurface. |
|
Write the NURBS surface to a VRML97 file.
Writes a VRML97 file which represents the surface for the parametric space [uS,uE] and [vS,vE]. It does not optimize the number of points required to represent the surface.
Reimplemented from PLib::ParaSurface. |
|
Write the NURBS surface to a VRML file.
Writes a VRML file which represents the surface for the parametric space [uS,uE] and [vS,vE]. It does not optimize the number of points required to represent the surface.
Reimplemented from PLib::ParaSurface. |
|
Generates a surface using global approximation.
|
|
generates a surface using global interpolation.
Generates a NURBS surface using global interpolation. The data points are assumed to be part of grided points in x-y. i.e. the original data set as points covering the xy plane at regular x and y intervals with only the z being a free variable
|
|
Generates a surface using global interpolation.
Generates a NURBS surface using global interpolation. The data points are assumed to be part of grided points in x-y. i.e. the original data set as points covering the xy plane at regular x and y intervals with only the z being a free variable
|
|
Interpolation of a surface from 2 sets of orthogonal curves.
Interpolation of a surface from 2 sets of orthogonal curves. See A10.3 at page 494 on the NURBS book for more details about the implementation.
|
|
Computes the parameters for global surface interpolation.
Computes the parameters for global surface interpolation. For more information, see A9.3 on p377 on the NURBS book.
|
|
Computes the parameters for global surface interpolation.
Computes the parameters for global surface interpolation. For more information, see A9.3 on p377 on the NURBS book.
|