Main Page   Class Hierarchy   Compound List   File List   Compound Members  

PLib::NurbsCurveSP Class Template Reference

A NURBS curve with surface point. More...

#include <nurbs_sp.hh>

Inheritance diagram for PLib::NurbsCurveSP::

PLib::NurbsCurve PLib::ParaCurve List of all members.

Public Methods

 NurbsCurveSP ()
 NurbsCurveSP (const NurbsCurve< T, N > &nurb)
 NurbsCurveSP (const NurbsCurveSP< T, N > &nurb)
 NurbsCurveSP (const Vector< HPoint_nD< T, N > > &P1, const Vector< T > &U1, int degree=3)
 NurbsCurveSP (const Vector< Point_nD< T, N > > &P1, const Vector< T > &W, const Vector< T > &U1, int degree=3)
virtual void reset (const Vector< HPoint_nD< T, N > > &P1, const Vector< T > &U1, int degree)
virtual NurbsCurve< T, N > & operator= (const NurbsCurve< T, N > &a)
NurbsCurveSP< T, N > & operator= (const NurbsCurveSP< T, N > &a)
virtual void modKnot (const Vector< T > &knot)
virtual void removeKnot (int r, int s, int num)
virtual void removeKnotsBound (const Vector< T > &ub, Vector< T > &ek, T E)
virtual void refineKnotVector (const Vector< T > &X)
virtual void mergeKnotVector (const Vector< T > &Um)
virtual void knotInsertion (T u, int r, NurbsCurveSP< T, N > &nc)
virtual void degreeElevate (int t)
int read (ifstream &fin)
void modSurfCPby (int i, const HPoint_nD< T, N > &a)
void modSurfCP (int i, const HPoint_nD< T, N > &a)
void modOnlySurfCPby (int i, const HPoint_nD< T, N > &a)
void modOnlySurfCP (int i, const HPoint_nD< T, N > &a)
maxAt (int i) const
HPoint_nD< T, N > surfP (int i) const
void updateMaxU ()
int okMax ()

Protected Attributes

Vector< T > maxU
Vector< T > maxAt_

Detailed Description

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

A NURBS curve with surface point.

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

Author:
Philippe Lavoie
Date:
7 May, 1998


Member Function Documentation

template<class T, int N>
void PLib::NurbsCurveSP< T, N >::degreeElevate int    t [inline, virtual]
 

degree elevate a curve a number of times.

For more information, see A5.9 on p 206 of the NURBS book

Parameters:
t  the number of times to increase the degree of the curve
Author:
Philippe Lavoie
Date:
24 January, 1997

Reimplemented from PLib::NurbsCurve.

template<class T, int N>
void PLib::NurbsCurveSP< T, N >::mergeKnotVector const Vector< T > &    Um [inline, virtual]
 

Merges the knot vector of a curve with another knot vector.

Will merge the Knot vector U with the one from the curve and it will refine the curve appropriately.

Parameters:
Um  the knot vector to merge with
Warning:
the knot U must be common with the one from the curve c
Author:
Philippe Lavoie
Date:
24 January, 1997

Reimplemented from PLib::NurbsCurve.

template<class T, int N>
void PLib::NurbsCurveSP< T, N >::modOnlySurfCPby int    i,
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 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>
NurbsCurve< T, N > & PLib::NurbsCurveSP< T, N >::operator= const NurbsCurve< T, N > &    a [inline, virtual]
 

The assignment operator for a NURBS curve.

Parameters:
curve  the NURBS curve to copy
Returns:
A reference to itself
Warning:
The curve being copied must be valid, otherwise strange results might occur.
Author:
Philippe Lavoie
Date:
24 January 1997

Reimplemented from PLib::NurbsCurve.

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

reads a NurbsCurve<T,N> from a file.

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

Reimplemented from PLib::NurbsCurve.

Reimplemented in PLib::NurbsCurveGL.

template<class T, int N>
void PLib::NurbsCurveSP< T, N >::refineKnotVector const Vector< T > &    X [inline, virtual]
 

Refine the curve knot vector.

For more information, see A5.4 on page 164 of the NURBS book

Parameters:
X  the new knots to insert in the knot vector
Author:
Philippe Lavoie
Date:
24 January, 1997

Reimplemented from PLib::NurbsCurve.

template<class T, int N>
void PLib::NurbsCurveSP< T, N >::removeKnot int    r,
int    s,
int    num
[inline, virtual]
 

Removes an internal knot from a curve. This is A5.8 on p185 from the NURB book modified to not check for tolerance before removing the knot.

Parameters:
r  the knot to remove
s  the multiplicity of the knot
num  the number of times to try to remove the knot
Warning:
r must be an internal knot.
Author:
Philippe Lavoie
Date:
24 January 1997

Reimplemented from PLib::NurbsCurve.

template<class T, int N>
void PLib::NurbsCurveSP< T, N >::removeKnotsBound const Vector< T > &    ub,
Vector< T > &    ek,
  E
[inline, virtual]
 

Remove knots from a curve without exceeding an error bound.

For more information about the algorithm, see A9.9 on p429 of the NURB book.

Parameters:
ub  the knot coefficients
ek  the error after removing
Author:
Philippe Lavoie
Date:
24 January 1997

Reimplemented from PLib::NurbsCurve.

template<class T, int N>
void PLib::NurbsCurveSP< T, N >::reset const Vector< HPoint_nD< T, N > > &    P1,
const Vector< T > &    U1,
int    degree
[inline, virtual]
 

Resets a NURBS curve to new values.

Parameters:
P1  the new values for the control points
U1  the new values for the knot vector
Degree  the new degree of the curve
Warning:
The size of P1,U1 and Degree must agree: P.n()+degree+1=U.n()
Author:
Philippe Lavoie
Date:
24 January 1997

Reimplemented from PLib::NurbsCurve.

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

Updates the basis value.

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 of the curve must be of 3 or less.
Author:
Philippe Lavoie
Date:
7 May, 1998


The documentation for this class was generated from the following files:
Generated on Sun Jan 27 18:56:52 2002 for NURBS++ by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001