Main Page | Class Hierarchy | Class List | File List | Class Members

PLib::HNurbsSurfaceSP< T, N > Class Template Reference

A NURBS surface with surface point. More...

#include <hnurbsS_sp.h>

Inheritance diagram for PLib::HNurbsSurfaceSP< T, N >:

PLib::HNurbsSurface< T, N > PLib::NurbsSurface< T, N > PLib::HNurbsSurfaceGL List of all members.

Public Member Functions

 HNurbsSurfaceSP (const NurbsSurface< T, N > &S)
 HNurbsSurfaceSP (const HNurbsSurface< T, N > &S)
 HNurbsSurfaceSP (const HNurbsSurfaceSP< T, N > &S)
 HNurbsSurfaceSP (HNurbsSurface< T, N > *base)
 HNurbsSurfaceSP (HNurbsSurface< T, N > *base, const Vector< T > &xU, const Vector< T > &xV)
 HNurbsSurfaceSP (HNurbsSurface< T, N > *base, const HNurbsSurface< T, N > &surf)
virtual void resizeKeep (int Pu, int Pv, int DegU, int DegV)
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)
virtual void updateSurface (int i0=-1, int j0=-1)
virtual void updateLevels (int updateLevel=-1)
virtual HNurbsSurfaceSP< T,
N > * 
addLevel (int nsplit, int s=1)
virtual HNurbsSurfaceSP< T,
N > * 
addLevel ()
virtual void copy (const HNurbsSurface< T, N > &nS)
virtual int read (ifstream &fin)
void modSurfCPby (int i, int j, const HPoint_nD< T, N > &a)
void modOnlySurfCPby (int i, int j, const HPoint_nD< T, N > &a)
maxAtUV (int i, int j) const
maxAtU (int i) const
maxAtV (int i) const
HPoint_nD< T, N > surfP (int i, int j) const
HPoint_nD< T, N > surfP (int i, int j, int lod) const
void updateMaxUV ()
void updateMaxU ()
void updateMaxV ()
int okMax ()

Protected Attributes

Vector< T > maxU
Vector< T > maxV
Vector< T > maxAtU_
Vector< T > maxAtV_

Detailed Description

template<class T, int N>
class PLib::HNurbsSurfaceSP< T, N >

A NURBS surface with surface point.

A Nurbs surface with surface point manipulators. This allows someone to modify the point on a surface for which a control point has maximal influence over it. This might provide a more intuitive method to modify a surface.

Author:
Philippe Lavoie
Date:
14 May, 1998


Member Function Documentation

template<class T, int N>
HNurbsSurfaceSP< T, N > * PLib::HNurbsSurfaceSP< T, N >::addLevel  )  [virtual]
 

Adds a level to this HNURBS surface.

Parameters:
n the number of new knots between each knots.
Returns:
a pointer to the new level or 0 if there was an error.
Warning:
returns 0, if there is already a nextlevel.
Author:
Philippe Lavoie
Date:
14 May 1998

Reimplemented from PLib::HNurbsSurface< T, N >.

Reimplemented in PLib::HNurbsSurfaceGL.

template<class T, int N>
HNurbsSurfaceSP< T, N > * PLib::HNurbsSurfaceSP< T, N >::addLevel int  n,
int  s = 1
[virtual]
 

Adds a level to this HNURBS surface.

Parameters:
n the number of new knots between each knots.
s the multiplicity of each of these knots
Returns:
a pointer to the new level or 0 if there was an error.
Warning:
returns 0, if there is already a nextlevel.
Author:
Philippe Lavoie
Date:
14 May 1998

template<class T, int N>
void PLib::HNurbsSurfaceSP< T, N >::copy const HNurbsSurface< T, N > &  nS  )  [virtual]
 

Copies a HNurbs Surface and all it children.

Parameters:
ns the HNurbs surface to copy
Author:
Philippe Lavoie
Date:
14 May 1998

Reimplemented from PLib::HNurbsSurface< T, N >.

template<class T, int N>
void PLib::HNurbsSurfaceSP< T, N >::mergeKnots const Vector< T > &  nU,
const Vector< T > &  nV
[inline, virtual]
 

merges a U and V knot vector with the surface knot vectors

Parameters:
nU the U knot vector to merge with
nV the V knot vector to merge with
Warning:
The nU and nV knot vectors must be compatible with the current vectors
Author:
Philippe Lavoie
Date:
24 January, 1997

Reimplemented from PLib::NurbsSurface< T, N >.

template<class T, int N>
void PLib::HNurbsSurfaceSP< T, N >::mergeKnotU const Vector< T > &  X  )  [inline, virtual]
 

merges the U knot vector with another one

Parameters:
X a knot vector
Warning:
The knot vector must be compatible with the U knot vector
Author:
Philippe Lavoie
Date:
24 January, 1997

Reimplemented from PLib::NurbsSurface< T, N >.

template<class T, int N>
void PLib::HNurbsSurfaceSP< T, N >::mergeKnotV const Vector< T > &  X  )  [inline, virtual]
 

merges the V knot vector with another one

Parameters:
X a knot vector
Warning:
The knot vector must be compatible with the V knot vector
Author:
Philippe Lavoie
Date:
24 January, 1997

Reimplemented from PLib::NurbsSurface< T, N >.

template<class T, int N>
void PLib::HNurbsSurfaceSP< T, N >::modOnlySurfCPby int  i,
int  j,
const HPoint_nD< T, N > &  a
 

Moves the surface point only.

Moves only the specified surface point. The other surface points normally affected by moving this point are {not} moved.

The point a is in the 4D homogenous space, but only the x,y,z value are used. The weight is not moved by this function.

Parameters:
i the row of the surface point to move
j the column of the surface point to move
a move that surface point by that amount.
Warning:
The degree of the curve must be of 3 or less.
Author:
Philippe Lavoie
Date:
7 June, 1998

template<class T, int N>
void PLib::HNurbsSurfaceSP< T, N >::modSurfCPby int  i,
int  j,
const HPoint_nD< T, N > &  a
 

Modifies the surface point by a certain value.

Parameters:
i the row of the surface point
j the column of the surface point
a modify the surface point by this value
Warning:
The degree in U and V of the surface must be of 3 or less.
Author:
Philippe Lavoie
Date:
14 May, 1998

template<class T, int N>
int PLib::HNurbsSurfaceSP< T, N >::read ifstream &  fin  )  [virtual]
 

Read a HNURBS surface from an input file stream.

Parameters:
fin the input file stream
Returns:
0 if an error occurs, 1 otherwise
Author:
Philippe Lavoie
Date:
7 October 1997

Reimplemented from PLib::HNurbsSurface< T, N >.

Reimplemented in PLib::HNurbsSurfaceGL.

template<class T, int N>
void PLib::HNurbsSurfaceSP< T, N >::refineKnots const Vector< T > &  nU,
const Vector< T > &  nV
[inline, virtual]
 

Refine both knot vectors.

Parameters:
nU the U knot vector to refine from
nV the V knot vector to refine from
Author:
Philippe Lavoie
Date:
24 January, 1997

Reimplemented from PLib::HNurbsSurface< T, N >.

template<class T, int N>
void PLib::HNurbsSurfaceSP< T, N >::refineKnotU const Vector< T > &  X  )  [inline, virtual]
 

Refines the U knot vector.

Parameters:
X the knot vector to refine from
Author:
Philippe Lavoie
Date:
24 January, 1997

Reimplemented from PLib::HNurbsSurface< T, N >.

template<class T, int N>
void PLib::HNurbsSurfaceSP< T, N >::refineKnotV const Vector< T > &  X  )  [inline, virtual]
 

Refines the V knot vector.

Parameters:
X the knot vector to refine from
Author:
Philippe Lavoie
Date:
24 January, 1997

Reimplemented from PLib::HNurbsSurface< T, N >.

template<class T, int N>
void PLib::HNurbsSurfaceSP< T, N >::resizeKeep int  Pu,
int  Pv,
int  DegU,
int  DegV
[inline, virtual]
 

Resize the surface while keeping the old values.

Parameters:
Pu the number of control points in the U direction
Pv the number of control points in the V direction
DegU the degree of the surface in the U direction
DegV the degree of the surface in the V direction
Author:
Philippe Lavoie
Date:
24 January, 1997

Reimplemented from PLib::NurbsSurface< T, N >.

template<class T, int N>
void PLib::HNurbsSurfaceSP< T, N >::updateLevels int  upLevel = -1  )  [virtual]
 

Update the surface for all the levels.

Parameters:
upLevel updates the levels up to this level of detail
Author:
Philippe Lavoie
Date:
7 October 1997

Reimplemented from PLib::HNurbsSurface< T, N >.

template<class T, int N>
void PLib::HNurbsSurfaceSP< T, N >::updateMaxU  ) 
 

Updates the basis value in the U direction.

Updates the basis value at which a control point has maximal influence. It also finds where the control point has maximal influence.

Warning:
The degrre in U of the surface must be of 3 or less.
Author:
Philippe Lavoie
Date:
14 May, 1998

template<class T, int N>
void PLib::HNurbsSurfaceSP< T, N >::updateMaxV  ) 
 

Updates the basis value in the V direction.

Updates the basis value at which a control point has maximal influence. It also finds where the control point has maximal influence.

Warning:
The degrre in V of the surface must be of 3 or less.
Author:
Philippe Lavoie
Date:
14 May, 1998

template<class T, int N>
void PLib::HNurbsSurfaceSP< T, N >::updateSurface int  i0 = -1,
int  j0 = -1
[virtual]
 

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.

Parameters:
i0 the row of the control point to update
j0 the column of the control point to update
Author:
Philippe Lavoie
Date:
7 October 1997

Reimplemented from PLib::HNurbsSurface< T, N >.


The documentation for this class was generated from the following files:
Generated on Mon Dec 29 08:25:18 2003 for NURBS++ by doxygen 1.3.4