UCBspl::SplineSurface Class Reference

Represents a uniform cubic B-spline surface. More...

#include <UCBsplineSurface.h>

List of all members.

Public Member Functions

 SplineSurface ()
 SplineSurface (boost::shared_ptr< GenMatrixType > PHI, double umin, double vmin, double umax, double vmax)
 SplineSurface (const SplineSurface &surf)
void init (boost::shared_ptr< GenMatrixType > PHI, double umin, double vmin, double umax, double vmax)
void getDomain (double &umin, double &vmin, double &umax, double &vmax) const
double umin () const
double vmin () const
double umax () const
double vmax () const
double f (double u, double v) const
double f (int i, int j) const
void normalVector (double u, double v, double &gx, double &gy, double &gz) const
void normalVector (int i, int j, double &gx, double &gy, double &gz) const
void derivatives (double u, double v, double &dx, double &dy) const
void secondDerivatives (double u, double v, double &ddx, double &ddy, double &dxdy) const
void curvatures (double u, double v, double &profC, double &planC) const
void eval (double u, double v, double &z, double &gx, double &gy, double &gz) const
void eval (int i, int j, double &z, double &gx, double &gy, double &gz) const
const boost::shared_ptr< GenMatrixTypegetCoefficients () const
void getIndexDomain (int &m, int &n) const
void refineCoeffs ()
bool restrictCoeffs ()


Detailed Description

Represents a uniform cubic B-spline surface.

SplineSurface - A uniform cubic B-spline surface compatible with that produced by the SINTEF MBA library.

Author:
Øyvind Hjelle <Oyvind.Hjelle@math.sintef.no>


Constructor & Destructor Documentation

UCBspl::SplineSurface::SplineSurface (  )  [inline]

Default constructor makes the domain over the unit square, but coefficient matrix is not allocated.

SplineSurface::SplineSurface ( boost::shared_ptr< GenMatrixType PHI,
double  umin,
double  vmin,
double  umax,
double  vmax 
)

Constructor with (standard) shared pointers to the uniform tensor product grid, and the domain.

SplineSurface::SplineSurface ( const SplineSurface surf  ) 

Copy constructor


Member Function Documentation

void SplineSurface::init ( boost::shared_ptr< GenMatrixType PHI,
double  umin,
double  vmin,
double  umax,
double  vmax 
)

Initialization similar to constructor

void UCBspl::SplineSurface::getDomain ( double &  umin,
double &  vmin,
double &  umax,
double &  vmax 
) const [inline]

The domain over which the spline surface is defined.

double SplineSurface::f ( double  u,
double  v 
) const

Evaluates the functional value of the surface in position (u,v) (u,v) must be inside the domain

double SplineSurface::f ( int  i,
int  j 
) const

Evaluates the functional value of the surface in position (i,j), where (i,j) is an index in the spline coefficient matrix. (i,j) must be inside the domain of the index values: 0 <= i <= m and 0 <= j <= n, where m_ and n_ are retrieved by the function getIndexDomain This is much faster than f(u,v) since pre-evaluate bases are used.

void SplineSurface::normalVector ( double  u,
double  v,
double &  gx,
double &  gy,
double &  gz 
) const

Evaluates the normal vector (normalized with length=1) in position in position (u,v). (u,v) must be inside the domain, see getDomain

void SplineSurface::normalVector ( int  i,
int  j,
double &  gx,
double &  gy,
double &  gz 
) const

Same as gradf(double u, double v,...), in a grid point. See also documentation of f(int i, int j).

void SplineSurface::eval ( double  u,
double  v,
double &  z,
double &  gx,
double &  gy,
double &  gz 
) const

Evaluates both function value and normalized normal vector. (u,v) must be inside the domain, see getDomain. This is faster than calling the functions above separately, e.g., when making triangle strips for visualization.

void SplineSurface::eval ( int  i,
int  j,
double &  z,
double &  gx,
double &  gy,
double &  gz 
) const

Same as eval(double u, double v,...), in a grid point. See also documentation of UCBsplineSurface::f (int i, int j).

const boost::shared_ptr<GenMatrixType> UCBspl::SplineSurface::getCoefficients (  )  const [inline]

Get the coefficient grid of the tensor product spline surface.

void UCBspl::SplineSurface::getIndexDomain ( int &  m,
int &  n 
) const [inline]

Index domain of spline coefficient matrix. The surface can also be evaluated by f(i,j) and other functions with 0 <= i <= m and 0 <= j <= n. Note that the size of the tensor product grid (in the C2 case) is [(m+3) x (n+3)]

void SplineSurface::refineCoeffs (  ) 

Refine spline surface to the next finer dyadic level. That is, make the tensor product grid twice as dense inside the active domain. Only the mathematical representation of the spline surface is changed, and not the geometry. (Simlar to the Oslo Algorithm.)

bool SplineSurface::restrictCoeffs (  ) 

Restrict the spline surface to the next coarser dyadic level. That is, make the tensor product grid twice as coarse inside the active domain. Both the mathematical representation and the geometry of the spline surface is changed. The effect is that the spline surfaces looks smoother. This operator has the so-called variational property with respect to the refinement operator above.

Note:
Restriction can only be done if the modulo of (noX-3)/2 and (noY-3)/2 are both zero. Here noX and noY is the size of the coefficient matrix.
Return values:
bool false if the coefficient grid does not meet the constraints above


The documentation for this class was generated from the following files:
Generated on Wed Nov 28 12:27:29 2007 for LSMG by  doxygen 1.5.1