#include <hnurbsS.hh>
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.
|
The basic constructor.
|
|
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.
|
|
The copy constructor.
|
|
Constructor with a base level.
|
|
Constructor with a base level.
|
|
A level constructor.
|
|
Destructor.
Deletes all the levels.
|
|
Adds a level to this HNURBS surface.
Reimplemented in PLib::HNurbsSurfaceSP, PLib::HNurbsSurfaceGL, and PLib::HNurbsSurfaceSP< float, 3 >. |
|
Adds a level to this HNURBS surface.
|
|
Copies a HNurbs Surface and all it children.
Reimplemented in PLib::HNurbsSurfaceSP. |
|
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.
|
|
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.
|
|
finds the homogenous point at (u,v) for a certain level of detail.
|
|
Initialize the base surface.
Initialize the base surface from the previous level if it has been modified.
|
|
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.
|
|
the maximum level of detail.
Finds the maximum level of detail available from this HNURBS surface
|
|
Specifies the level that modifies the point.
Specifies what level modifies the point (u,v)
|
|
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.
|
|
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, PLib::HNurbsSurfaceGL, and PLib::HNurbsSurfaceSP< float, 3 >. |
|
Reads a HNURBS surface from a file.
Reimplemented from PLib::NurbsSurface. Reimplemented in PLib::HNurbsSurfaceGL. |
|
Refine both knot vectors.
Reimplemented from PLib::NurbsSurface. Reimplemented in PLib::HNurbsSurfaceSP. |
|
Refines the U knot vector.
Reimplemented from PLib::NurbsSurface. Reimplemented in PLib::HNurbsSurfaceSP. |
|
Refines the V knot vector.
Reimplemented from PLib::NurbsSurface. Reimplemented in PLib::HNurbsSurfaceSP. |
|
Scales the object.
|
|
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.
|
|
The offset vector are variable.
Fixes the offsset vector direction to a variable value. The value depends on its base layer.
|
|
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.
|
|
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.
|
|
Update the surface for all the levels.
Reimplemented in PLib::HNurbsSurfaceSP, and PLib::HNurbsSurfaceSP< float, 3 >. |
|
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, and PLib::HNurbsSurfaceSP< float, 3 >. |
|
Write a HNURBS surface to a file stream.
Reimplemented from PLib::NurbsSurface. Reimplemented in PLib::HNurbsSurfaceGL. |
|
write a HNURBS surface to a file.
Reimplemented from PLib::NurbsSurface. Reimplemented in PLib::HNurbsSurfaceGL. |