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

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

A NURBS surface with surface point. More...

#include <nurbsS_sp.h>

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

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

Public Member Functions

 NurbsSurfaceSP (const NurbsSurface< T, N > &nS)
 NurbsSurfaceSP (const NurbsSurfaceSP< T, N > &nS)
 NurbsSurfaceSP (int DegU, int DegV, const Vector< T > &Uk, const Vector< T > &Vk, const Matrix< HPoint_nD< T, N > > &Cp)
 NurbsSurfaceSP (int DegU, int DegV, Vector< T > &Uk, Vector< T > &Vk, Matrix< Point_nD< T, N > > &Cp, Matrix< T > &W)
virtual NurbsSurface< T, N > & operator= (const NurbsSurface< T, N > &a)
virtual NurbsSurfaceSP< T,
N > & 
operator= (const NurbsSurfaceSP< T, N > &a)
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 int read (ifstream &fin)
virtual void degreeElevateU (int tU)
virtual void degreeElevateV (int tV)
NurbsSurfaceSP< T, N > generateParallel (T d) const
void modSurfCPby (int i, int j, const HPoint_nD< T, N > &a)
void modSurfCP (int i, int j, const HPoint_nD< T, N > &a)
void modOnlySurfCPby (int i, int j, const HPoint_nD< T, N > &a)
void modOnlySurfCP (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
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::NurbsSurfaceSP< 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:
8 May, 1998


Member Function Documentation

template<class T, int N>
void PLib::NurbsSurfaceSP< T, N >::degreeElevateU int  tU  )  [inline, virtual]
 

Degree elevate the surface in the U direction.

Parameters:
t elevate the degree in the u direction by this amount.
Author:
Philippe Lavoie
Date:
24 January, 1997

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

template<class T, int N>
void PLib::NurbsSurfaceSP< T, N >::degreeElevateV int  tV  )  [inline, virtual]
 

Degree elevate the surface in the V direction.

Parameters:
t elevate the degree in the v direction by this amount.
Author:
Philippe Lavoie
Date:
24 January, 1997

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

template<class T, int N>
NurbsSurfaceSP< T, N > PLib::NurbsSurfaceSP< T, N >::generateParallel d  )  const
 

Generate a parallel surface.

Generates an offset surface from this surface. An offset surface is a surface wich has its surface parallel to an other one. There is a distance of d between the two parallel surfaces.

The algorithm used is very naive. It generates a surface such that a point s_2(u,v) = s(u,v) + d n(u,v) where s_2(u,v,) is the point on the parallel surface at (u,v) , s(u,v) is the point on the original surface at (u,v), d is the offset between the two and n(u,v) is the normal on the surface at the point (u,v).

Parameters:
d the distance between the surface and its offset the parallel surface.
Author:
Philippe Lavoie
Date:
8 May, 1998

template<class T, int N>
T PLib::NurbsSurfaceSP< T, N >::maxAtU int  i  )  const [inline]
 

< Where is the maximal basis function in U for the control points in row i

template<class T, int N>
T PLib::NurbsSurfaceSP< T, N >::maxAtUV int  i,
int  j
const [inline]
 

< The maximal basis function for the control point i,j

template<class T, int N>
T PLib::NurbsSurfaceSP< T, N >::maxAtV int  i  )  const [inline]
 

< Where is the maximal basis function in U for the control points in colum i

template<class T, int N>
void PLib::NurbsSurfaceSP< 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::NurbsSurfaceSP< 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::NurbsSurfaceSP< 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::NurbsSurfaceSP< T, N >::modOnlySurfCP int  i,
int  j,
const HPoint_nD< T, N > &  a
[inline]
 

Parameters:
a  Changes only the the surface point near a control point, the other surface point will not be moved.

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

Move 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.
Author:
Philippe Lavoie
Date:
7 June, 1998

template<class T, int N>
void PLib::NurbsSurfaceSP< T, N >::modSurfCP int  i,
int  j,
const HPoint_nD< T, N > &  a
[inline]
 

Parameters:
a  Moves a surface point to a value

template<class T, int N>
void PLib::NurbsSurfaceSP< T, N >::modSurfCPby int  i,
int  j,
const HPoint_nD< T, N > &  a
[inline]
 

Parameters:
a  Moves a surface point by a value

template<class T, int N>
NurbsSurface< T, N > & PLib::NurbsSurfaceSP< T, N >::operator= const NurbsSurface< T, N > &  nS  )  [inline, virtual]
 

NurbsSurface<T,N> assignment.

Parameters:
nS the NURBS surface to copy
Author:
Philippe Lavoie
Date:
24 January, 1997

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

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

Read a surface from an input stream.

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

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

Reimplemented in PLib::NurbsSurfaceGL.

template<class T, int N>
void PLib::NurbsSurfaceSP< 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::NurbsSurface< T, N >.

template<class T, int N>
void PLib::NurbsSurfaceSP< 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::NurbsSurface< T, N >.

template<class T, int N>
void PLib::NurbsSurfaceSP< 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::NurbsSurface< T, N >.

template<class T, int N>
void PLib::NurbsSurfaceSP< 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>
HPoint_nD<T,N> PLib::NurbsSurfaceSP< T, N >::surfP int  i,
int  j
const [inline]
 

< the surface point for the control point at i,j

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

Updates the basis value for 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 degree in U of the surface must be of 3 or less.
Author:
Philippe Lavoie
Date:
8 May, 1998

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

Updates the basis value for 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 degree in V of the surface must be of 3 or less.
Author:
Philippe Lavoie
Date:
8 May, 1998


Member Data Documentation

template<class T, int N>
Vector<T> PLib::NurbsSurfaceSP< T, N >::maxAtU_ [protected]
 

The vector identifiying where is the maximal basis function in U.

template<class T, int N>
Vector<T> PLib::NurbsSurfaceSP< T, N >::maxAtV_ [protected]
 

The vector identifiying where is the maximal basis function in V.

template<class T, int N>
Vector<T> PLib::NurbsSurfaceSP< T, N >::maxU [protected]
 

The vector of maximal basis function value in U.

template<class T, int N>
Vector<T> PLib::NurbsSurfaceSP< T, N >::maxV [protected]
 

The vector of maximal basis function value in V.


The documentation for this class was generated from the following files:
Generated on Wed Dec 10 14:28:15 2003 for NURBS++ by doxygen 1.3.4