Main Page   Class Hierarchy   Compound List   File List   Compound Members  

PLib::NurbsCurveArray Class Template Reference

an array of NurbsCurve. More...

#include <nurbs.h>

List of all members.

Public Methods

int n () const
 NurbsCurveArray (NurbsCurve< T, N > *Ca, int size)
 NurbsCurveArray ()
virtual ~NurbsCurveArray ()
virtual NurbsCurve< T, N > & operator[] (int i)
virtual NurbsCurve< T, N > operator[] (int i) const
virtual void resize (int s)
void init (NurbsCurve< T, N > *Ca, int size)
int read (const char *filename)
int write (const char *filename)
int writePS (const char *, int cp=0, T magFact=T(-1), T dash=T(5), bool bOpen=true) const
int writePSp (const char *, const Vector< Point_nD< T, N > > &, const Vector< Point_nD< T, N > > &, int cp=0, T magFact=0.0, T dash=5.0, bool bOpen=true) const

Protected Methods

NurbsCurve< T, N > & curve (int i)
NurbsCurve< T, N > curve (int i) const

Protected Attributes

int sze
int rsize
NurbsCurve< T, N > ** C


Detailed Description

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

an array of NurbsCurve.

This class represents an array of NurbsCurve.

Author:
Philippe Lavoie
Date:
4 Oct. 1996

Definition at line 337 of file nurbs.h.


Constructor & Destructor Documentation

template<class T, int N>
PLib::NurbsCurveArray< T, N >::NurbsCurveArray NurbsCurve< T, N > *    Ca,
int    s
 

Constructor from a pointer to an array of curves.

Author:
Philippe Lavoie
Date:
24 January 1997

Definition at line 45 of file nurbsArray.cpp.

References resize.


Member Function Documentation

template<class T, int N>
void PLib::NurbsCurveArray< T, N >::init NurbsCurve< T, N > *    ca,
int    size
 

Initialize the array of curves with a vector of nurbs curve.

Parameters:
ca  a pointer to a vector of NURBS curve
size  the size of the array
Author:
Philippe Lavoie
Date:
24 January 1997

Definition at line 62 of file nurbsArray.cpp.

References resize.

template<class T, int N>
int PLib::NurbsCurveArray< T, N >::read const char *    filename
 

Reads a NurbsCurveArray from a file.

Parameters:
filename  the filename to read the curve array from
Returns:
0 if an error occurs, 1 otherwise
Author:
Philippe Lavoie
Date:
24 January 1997

Definition at line 108 of file nurbsArray.cpp.

References resize.

template<class T, int N>
void PLib::NurbsCurveArray< T, N >::resize int    size [virtual]
 

Resize the NurbsCurveArray.

Parameters:
size  the new size
Author:
Philippe Lavoie
Date:
24 January 1997

Definition at line 77 of file nurbsArray.cpp.

Referenced by init, NurbsCurveArray, and read.

template<class T, int N>
int PLib::NurbsCurveArray< T, N >::write const char *    filename
 

Writes a NurbsCurveArray from a file.

Parameters:
filename  --> the filename to read the curve array from
Returns:
0 if an error occurs, 1 otherwise
Author:
Philippe Lavoie
Date:
24 January 1997

Definition at line 166 of file nurbsArray.cpp.

template<class T, int N>
int PLib::NurbsCurveArray< T, N >::writePS const char *    filename,
int    cp = 0,
  magFact = T(-1),
  dash = T(5),
bool    bOpen = true
const
 

Writes a post-script file representing an array of curves.

Parameters:
filename  the file to write the postscript file to
cp  a flag indicating if the control points should be drawn, 0 = no and 1 = yes
magFact  a magnification factor, the 2D point of the control points will be magnified by this value. The size is measured in postscript points. If the magFact is set to a value smaller or equal to 0, than the program will try to guess a magnification factor such that the curve is large enough to fill the page.
dash  the size of the dash in postscript points . A size smaller or equal to 0 indicates that the line joining the control points is plain.
Returns:
0 if an error occurs, 1 otherwise
Warning:
If the weights of the curve are not all at 1, the result might not be representative of the true NURBS curve.
Author:
Philippe Lavoie
Date:
7 October 1998

Definition at line 344 of file nurbsArray.cpp.

template<class T, int N>
int PLib::NurbsCurveArray< T, N >::writePSp const char *    filename,
const Vector< Point_nD< T, N > > &    points,
const Vector< Point_nD< T, N > > &    vectors,
int    cp = 0,
  magFact = 0.0,
  dash = 5.0,
bool    bOpen = true
const
 

Writes a post-script file representing the array of curves.

Writes the array of curves in the postscript format to a file, it also draws the points defined in $points$ with their associated vectors if $vector$ is used.

Parameters:
filename  the file to write the postscript file to
points  draws these additional points as empty circles
vectors  specify a vector associated with the points (this can be an empty vector)
cp  a flag indicating if the control points should be drawn, 0 = no and 1 = yes
magFact  a magnification factor, the 2D point of the control points will be magnified by this value. The size is measured in postscript points. If the magFact is set to a value smaller or equal to 0, than the program will try to guess a magnification factor such that the curve is large enough to fill the page.
dash  the size of the dash in postscript points . A size smaller or equal to 0 indicates that the line joining the control points is plain.
Returns:
0 if an error occurs, 1 otherwise
Warning:
If the weights of the curve are not all at 1, the result might not be representative of the true NURBS curve. If vectors is used, then it must be of the same size as points. If a vector element is (0,0,0) it will not be drawn.
Author:
Philippe Lavoie
Date:
7 October 1998

Definition at line 521 of file nurbsArray.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 13:27:00 2003 for NURBS++ by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002