#include <hnurbsS.h>
Inheritance diagram for PLib::HNurbsSurface:
Public Methods | |
HNurbsSurface () | |
HNurbsSurface (const NurbsSurface< T, N > &S) | |
HNurbsSurface (const HNurbsSurface< T, N > &S) | |
HNurbsSurface (HNurbsSurface< T, N > *base) | |
HNurbsSurface (HNurbsSurface< T, N > *base, const Vector< T > &xU, const Vector< T > &xV) | |
HNurbsSurface (HNurbsSurface< T, N > *base, const HNurbsSurface< T, N > &surf) | |
virtual | ~HNurbsSurface () |
HNurbsSurface< T, N > * | baseLevel () const |
HNurbsSurface< T, N > * | nextLevel () const |
HNurbsSurface< T, N > * | firstLevel () const |
HNurbsSurface< T, N > * | lastLevel () const |
void | splitUV (int nu, int nv, Vector< T > &nU, Vector< T > &nV) |
void | splitUV (int nu, int su, int nv, int sv, Vector< T > &nU, Vector< T > &nV) |
virtual HNurbsSurface< T, N > * | addLevel (int nsplit) |
virtual HNurbsSurface< T, N > * | addLevel () |
virtual void | copy (const HNurbsSurface< T, N > &nS) |
int | modifies (T u, T v) |
HPoint_nD< T, N > | operator() (T u, T v) const |
HPoint_nD< T, N > | hpointAt (T u, T v, int lod=-1) const |
void | deriveAtH (T u, T v, int, Matrix< HPoint_nD< T, N > > &, int lod=-1) const |
void | deriveAt (T u, T v, int, Matrix< Point_nD< T, N > > &, int lod=-1) const |
int | movePointOffset (T u, T v, const Point_nD< T, N > &delta) |
void | scale (const Point_nD< T, N > &s) |
int | initBase (int force=0) |
virtual void | updateSurface (int i0=-1, int j0=-1) |
virtual void | updateLevels (int updateLevel=-1) |
int | isoCurveU (T u, NurbsCurve< T, N > &c, int lod=-1) const |
int | isoCurveV (T v, NurbsCurve< T, N > &c, int lod=-1) const |
int | read (const char *filename) |
int | write (const char *filename) const |
virtual int | read (ifstream &fin) |
int | write (ofstream &fout) const |
int | level () const |
int | maxLevel () const |
int | modifiedN () const |
void | refineKnots (const Vector< T > &nU, const Vector< T > &nV) |
void | refineKnotU (const Vector< T > &X) |
void | refineKnotV (const Vector< T > &X) |
void | axis (int i, int j, Point_nD< T, N > &xaxis, Point_nD< T, N > &yaxis, Point_nD< T, N > &zaxis) const |
void | setFixedOffsetVector (const Point_nD< T, N > &I, const Point_nD< T, N > &J, const Point_nD< T, N > &K) |
void | setVariableOffsetVector () |
Public Attributes | |
Matrix< HPoint_nD< T, N > > | offset |
Vector< T > | rU |
Vector< T > | rV |
Protected Attributes | |
NurbsSurface< T, N > | baseSurf |
HNurbsSurface< T, N > * | baseLevel_ |
HNurbsSurface< T, N > * | nextLevel_ |
HNurbsSurface< T, N > * | firstLevel_ |
HNurbsSurface< T, N > * | lastLevel_ |
Matrix< Point_nD< T, N > > | ivec |
Matrix< Point_nD< T, N > > | jvec |
Matrix< Point_nD< T, N > > | kvec |
int | level_ |
int | updateN |
int | baseUpdateN |
int | update_ |
T | uS_ |
T | uE_ |
T | vS_ |
T | vE_ |
T | uD |
T | vD |
int | fixedOffset |
This class can represent and manipulate a hierarchical NURBS surface. The surface is composed of points in homogenous space. It can have any degree and have any number of control points.
This does not correspond to the HBsplines given by Forsey. However I hope that it will be usefull for interactive manipulations of NURBS surfaces.
Other aspects of my implementation are different. They will be documented when the class is fully functionnal.
Presently there is only a limited set of functions available for this class. And honestly, until I can optimize the space requirement of the class I don't think you should build anything critical with a HNurbsSurface.
Definition at line 60 of file hnurbsS.h.
|
The basic constructor.
Definition at line 39 of file hnurbsS.cpp. |
|
Constructs a base HNURBS.
Constructs a base HNURBS. This HNURBS surface is set to level 0. And it corresponds to the NURBS surface. This constructor does not transform the NURBS surface into a HNURBS surface. It only copies the values from the NURBS surface as it's base offset values.
Definition at line 190 of file hnurbsS.cpp. References PLib::NurbsSurface::P. |
|
The copy constructor.
Definition at line 215 of file hnurbsS.cpp. References copy. |
|
Constructor with a base level.
Definition at line 129 of file hnurbsS.cpp. References PLib::NurbsSurface::degU, PLib::NurbsSurface::degV, initBase, PLib::NurbsSurface::P, PLib::NurbsSurface::U, and PLib::NurbsSurface::V. |
|
Constructor with a base level.
Definition at line 66 of file hnurbsS.cpp. References PLib::NurbsSurface::degU, PLib::NurbsSurface::degV, initBase, PLib::NurbsSurface::P, PLib::NurbsSurface::U, and PLib::NurbsSurface::V. |
|
A level constructor.
Definition at line 245 of file hnurbsS.cpp. |
|
Destructor.
Deletes all the levels.
Definition at line 685 of file hnurbsS.cpp. |
|
Adds a level to this HNURBS surface.
Reimplemented in PLib::HNurbsSurfaceSP. Definition at line 897 of file hnurbsS.cpp. References HNurbsSurface. Referenced by read. |
|
Adds a level to this HNURBS surface.
Definition at line 869 of file hnurbsS.cpp. References HNurbsSurface, and splitUV. |
|
Copies a HNurbs Surface and all it children.
Reimplemented in PLib::HNurbsSurfaceSP. Definition at line 292 of file hnurbsS.cpp. References HNurbsSurface. Referenced by HNurbsSurface. |
|
Finds the derivative of the point (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.
Definition at line 662 of file hnurbsS.cpp. |
|
Finds the derivative of the point (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.
Definition at line 632 of file hnurbsS.cpp. |
|
finds the homogenous point at (u,v) for a certain level of detail.
Definition at line 588 of file hnurbsS.cpp. Referenced by PLib::HNurbsSurface< float, N >::operator(). |
|
Initialize the base surface.
Initialize the base surface from the previous level if it has been modified.
Definition at line 411 of file hnurbsS.cpp. Referenced by HNurbsSurface, refineKnots, setFixedOffsetVector, setVariableOffsetVector, PLib::HNurbsSurfaceSP::updateSurface, and updateSurface. |
|
generates an iso curve in the U direction.
Generates an iso-parametric curve which goes through the parametric value u along the U direction.
Definition at line 926 of file hnurbsS.cpp. |
|
generates an iso curve in the V direction.
Generates an iso-parametric curve which goes through the parametric value v along the V direction.
Definition at line 959 of file hnurbsS.cpp. |
|
the maximum level of detail.
Finds the maximum level of detail available from this HNURBS surface
Definition at line 610 of file hnurbsS.cpp. |
|
Specifies the level that modifies the point.
Specifies what level modifies the point (u,v)
Definition at line 550 of file hnurbsS.cpp. References PLib::NurbsSurface::degU, PLib::NurbsSurface::degV, PLib::NurbsSurface::findSpanU, PLib::NurbsSurface::findSpanV, PLib::NurbsSurface::knotU, and PLib::NurbsSurface::knotV. |
|
Move a point on the surface.
This moves the point s(u,v) by delta. As this is a HNURBS surface. It moves the offset surface by delta, it doesn't move the surface point per say.
Definition at line 1372 of file hnurbsS.cpp. References PLib::NurbsSurface::P, and updateSurface. |
|
Returns the point on the surface at u,v.
Returns the point on the surface at u,v
Reimplemented from PLib::NurbsSurface. |
|
Read a HNURBS surface from a file stream.
Reimplemented from PLib::NurbsSurface. Reimplemented in PLib::HNurbsSurfaceSP. Definition at line 988 of file hnurbsS.cpp. References addLevel, PLib::NurbsSurface::P, PLib::NurbsSurface::resize, PLib::NurbsSurface::U, updateSurface, and PLib::NurbsSurface::V. |
|
Reads a HNURBS surface from a file.
Reimplemented from PLib::NurbsSurface. Reimplemented in PLib::HNurbsSurfaceGL. Definition at line 1123 of file hnurbsS.cpp. |
|
Refine both knot vectors.
Reimplemented from PLib::NurbsSurface. Reimplemented in PLib::HNurbsSurfaceSP. Definition at line 1260 of file hnurbsS.cpp. References initBase, refineKnotU, and refineKnotV. |
|
Refines the U knot vector.
Reimplemented from PLib::NurbsSurface. Reimplemented in PLib::HNurbsSurfaceSP. Definition at line 1279 of file hnurbsS.cpp. References PLib::NurbsSurface::degU, PLib::NurbsSurface::degV, PLib::NurbsSurface::U, updateSurface, and PLib::NurbsSurface::V. Referenced by refineKnots. |
|
Refines the V knot vector.
Reimplemented from PLib::NurbsSurface. Reimplemented in PLib::HNurbsSurfaceSP. Definition at line 1321 of file hnurbsS.cpp. References PLib::NurbsSurface::degU, PLib::NurbsSurface::degV, PLib::NurbsSurface::U, updateSurface, and PLib::NurbsSurface::V. Referenced by refineKnots. |
|
Scales the object.
Definition at line 1409 of file hnurbsS.cpp. |
|
The offset vector are fixed.
Fixes the offset vector direction to a unique value. The offset vector's direction won't depend on its base layer.
Definition at line 1437 of file hnurbsS.cpp. References initBase, and updateSurface. |
|
The offset vector are variable.
Fixes the offsset vector direction to a variable value. The value depends on its base layer.
Definition at line 1457 of file hnurbsS.cpp. References initBase, and updateSurface. |
|
Insert n knots betwen each knots.
Insert nu knots betwen each knots in the U vector and nv knots between each knots in the V vector. This doesn't not perform a split. It just generates a suitable rU and rV vector. It is suggested that splitting should be done for the level above, not the local level.
Definition at line 803 of file hnurbsS.cpp. References PLib::NurbsSurface::degU, PLib::NurbsSurface::degV, PLib::NurbsSurface::knotU, and PLib::NurbsSurface::knotV. |
|
Insert n knots betwen each knots.
Insert nu knots betwen each knots in the U vector and nv knots between each knots in the V vector. This does not perform a split. It just generates a suitable rU and rV vector. It is suggested that splitting should be done for the level above, not the local level.
Definition at line 743 of file hnurbsS.cpp. References PLib::NurbsSurface::knotU, and PLib::NurbsSurface::knotV. Referenced by PLib::HNurbsSurfaceSP::addLevel, and addLevel. |
|
Update the surface for all the levels.
Reimplemented in PLib::HNurbsSurfaceSP. Definition at line 707 of file hnurbsS.cpp. References updateSurface. |
|
updates the NURBS surface.
Updates the NURBS surface according to the offset values and its base level. You can update only one control point from the surface if you specify a value for i and j or you can update all the points if i0 or j0 is below 0.
Reimplemented in PLib::HNurbsSurfaceSP. Definition at line 330 of file hnurbsS.cpp. References PLib::NurbsSurface::degU, PLib::NurbsSurface::degV, initBase, PLib::NurbsSurface::P, PLib::NurbsSurface::U, and PLib::NurbsSurface::V. Referenced by movePointOffset, read, refineKnotU, refineKnotV, setFixedOffsetVector, setVariableOffsetVector, and updateLevels. |
|
Write a HNURBS surface to a file stream.
Reimplemented from PLib::NurbsSurface. Reimplemented in PLib::HNurbsSurfaceGL. Definition at line 1143 of file hnurbsS.cpp. References PLib::NurbsSurface::degU, PLib::NurbsSurface::degV, PLib::NurbsSurface::P, PLib::NurbsSurface::U, and PLib::NurbsSurface::V. |
|
write a HNURBS surface to a file.
Reimplemented from PLib::NurbsSurface. Reimplemented in PLib::HNurbsSurfaceGL. Definition at line 1219 of file hnurbsS.cpp. |