version 3.3

VRS::Nurbs Class Reference

Non-uniform rational B-spline. More...

#include <vrs/nurbs.h>

Inheritance diagram for VRS::Nurbs:

VRS::Shape VRS::RenderObj VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 Nurbs (int orderU, int orderV, int nU, int nV, double tolerance=25.0)
virtual void setCharacteristic (int orderU, int orderV, int nU, int nV)
virtual int getNU () const
virtual int getNV () const
virtual int getOrderU () const
virtual int getOrderV () const
virtual void setVertex (int iu, int iv, const Vector &)
virtual Vector getVertex (int iu, int iv) const
virtual void setWeight (int ui, int vi, double w)
virtual double getWeight (int ui, int vi) const
virtual void loadVertices (Iterator< Vector > *)
virtual void loadVertices3fv (int novertices, const double *)
virtual void loadVertices4fv (int novertices, const double *)
virtual void loadWeights (const Array< double > &weights)
virtual void setKnotU (int i, double v)
virtual void setKnotV (int i, double v)
virtual double getKnotU (int i) const
virtual double getKnotV (int i) const
virtual void loadKnotsU (const Array< double > &knotsU)
virtual void loadKnotsV (const Array< double > &knotsV)
virtual void loadKnotsUfv (int no, const double *)
virtual void loadKnotsVfv (int no, const double *)
virtual bool knotsConsistent () const
 Set/Query the Knot and Coordinate arrays.
virtual void setSamplingTolerance (double pixel)
virtual double getSamplingTolerance () const
virtual double * verticesRep () const
virtual double * knotsRepU () const
virtual double * knotsRepV () const
 Direct memory access, used by painters.
virtual Bounds boundingBox () const
 Bounding box of the NURBS.
 VRS_TYPEINFO (Nurbs, Shape)
 VRS_SERIALIZABLE (Nurbs)

Protected Member Functions

 Nurbs ()


Detailed Description

Non-uniform rational B-spline.

Constructor & Destructor Documentation

VRS::Nurbs::Nurbs ( int  orderU,
int  orderV,
int  nU,
int  nV,
double  tolerance = 25.0 
)

VRS::Nurbs::Nurbs (  )  [protected]


Member Function Documentation

virtual void VRS::Nurbs::setCharacteristic ( int  orderU,
int  orderV,
int  nU,
int  nV 
) [virtual]

int VRS::Nurbs::getNU (  )  const [inline, virtual]

int VRS::Nurbs::getNV (  )  const [inline, virtual]

int VRS::Nurbs::getOrderU (  )  const [inline, virtual]

int VRS::Nurbs::getOrderV (  )  const [inline, virtual]

A NURB surface is characterized by the following coefficients: orderU : order in u dimension orderV : order in v dimension nU : no of rows of control point grid nV : no of columns of control point grid

'setCharacteristic' resizes the internal arrays used to store the data. The current contents of vertex array, weight array, and knot vectors might get lost. Constraints: order must be positive, and the number of grid points must be equal or more than the order.

virtual void VRS::Nurbs::setVertex ( int  iu,
int  iv,
const Vector  
) [virtual]

virtual Vector VRS::Nurbs::getVertex ( int  iu,
int  iv 
) const [virtual]

virtual void VRS::Nurbs::setWeight ( int  ui,
int  vi,
double  w 
) [virtual]

virtual double VRS::Nurbs::getWeight ( int  ui,
int  vi 
) const [virtual]

The grid of control points consists of nU * nV points. Each point is specified by its coordinates and its weight. The index of a vertex and its weights is (ui, vi), 0 <= ui < nU, and 0 <= vi < nV.

virtual void VRS::Nurbs::loadVertices ( Iterator< Vector > *   )  [virtual]

virtual void VRS::Nurbs::loadVertices3fv ( int  novertices,
const double *   
) [virtual]

virtual void VRS::Nurbs::loadVertices4fv ( int  novertices,
const double *   
) [virtual]

virtual void VRS::Nurbs::loadWeights ( const Array< double > &  weights  )  [virtual]

For convenience, 'loadVertices' methods provide a faster way to set the whole grid of vertices. 'loadVertices3fv' expects an array of floats in which for each vertex (x, y, z) values are stored. 'loadVertices4fv' expects an array of floats in which for each vertex (x, y, z, w) values are stored.

virtual void VRS::Nurbs::setKnotU ( int  i,
double  v 
) [virtual]

virtual void VRS::Nurbs::setKnotV ( int  i,
double  v 
) [virtual]

virtual double VRS::Nurbs::getKnotU ( int  i  )  const [virtual]

virtual double VRS::Nurbs::getKnotV ( int  i  )  const [virtual]

virtual void VRS::Nurbs::loadKnotsU ( const Array< double > &  knotsU  )  [virtual]

virtual void VRS::Nurbs::loadKnotsV ( const Array< double > &  knotsV  )  [virtual]

virtual void VRS::Nurbs::loadKnotsUfv ( int  no,
const double *   
) [virtual]

virtual void VRS::Nurbs::loadKnotsVfv ( int  no,
const double *   
) [virtual]

virtual bool VRS::Nurbs::knotsConsistent (  )  const [virtual]

Set/Query the Knot and Coordinate arrays.

virtual void VRS::Nurbs::setSamplingTolerance ( double  pixel  )  [virtual]

double VRS::Nurbs::getSamplingTolerance (  )  const [inline, virtual]

The sampling tolerance specifies the maximal length of line segments or edges of polygons used to render NURBS. Default is 25.

double * VRS::Nurbs::verticesRep (  )  const [inline, virtual]

double * VRS::Nurbs::knotsRepU (  )  const [inline, virtual]

double * VRS::Nurbs::knotsRepV (  )  const [inline, virtual]

Direct memory access, used by painters.

virtual Bounds VRS::Nurbs::boundingBox (  )  const [virtual]

Bounding box of the NURBS.

Implements VRS::Shape.

VRS::Nurbs::VRS_TYPEINFO ( Nurbs  ,
Shape   
)

VRS::Nurbs::VRS_SERIALIZABLE ( Nurbs   ) 


The documentation for this class was generated from the following file:

Generated on Wed May 22 06:00:25 2013 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact