#include <nurbsSub.h>
Public Member Functions | |
NurbsSubSurface (const NurbsSurface< T, 3 > &s) | |
~NurbsSubSurface () | |
void | drawSubdivisionPS (ostream &os, T tolerance) |
void | drawSubdivisionPS (const char *f, T tolerance) |
void | drawSubdivisionVRML (ostream &os, T tolerance, const Color &col=Color(0, 0, 255)) |
void | drawSubdivisionVRML (const char *f, T tolerance, const Color &col=Color(0, 0, 255)) |
void | drawSubdivisionVRML97 (ostream &os, T tolerance, const Color &col=Color(0, 0, 255)) |
void | drawSubdivisionVRML97 (const char *f, T tolerance, const Color &col=Color(0, 0, 255)) |
void | drawSubdivisionPoints (BasicArray< Point_nD< T, 3 > > &pnts, T tolerance) |
void | drawSubdivisionPoints (T tolerance) |
Protected Member Functions | |
void | drawSubdivision (T tolerance) |
void | initSurf () |
Protected Attributes | |
RenderMesh< T > * | render |
const NurbsSurface< T, 3 > & | rsurf |
NurbSurface< T > * | surf |
This class adds the methods and the information necessary for performing subdivision on the surface.
Subdivision is mainly used to output the surface in diverse formats such as VRML, Post-Sript or a mesh file.
This class is based on code from the article "Tessellation of NURB Surfaces" by John W. Peterson, jp@blowfish.taligent.com in "Graphics Gems IV", Academic Press, 1994
PLib::NurbsSubSurface< T >::NurbsSubSurface | ( | const NurbsSurface< T, 3 > & | s | ) |
Constructor from a NurbsSurface.
Constructor from a NurbsSurface
s | the NurbsSurface to construct from |
PLib::NurbsSubSurface< T >::~NurbsSubSurface | ( | ) |
Destructor.
void PLib::NurbsSubSurface< T >::drawSubdivisionPS | ( | ostream & | os, | |
T | tolerance | |||
) |
perform the subdivision of the NURBS and write the result in a PS file.
os | the ostream to write to | |
tolerance | the accepted tolerance |
void PLib::NurbsSubSurface< T >::drawSubdivisionPS | ( | const char * | f, | |
T | tolerance | |||
) |
perform the subdivision of the NURBS and write the result in a PS file.
f | the file name to write to | |
tolerance | the accepted tolerance |
void PLib::NurbsSubSurface< T >::drawSubdivisionVRML | ( | ostream & | os, | |
T | tolerance, | |||
const Color & | col = Color(0,0,255) | |||
) |
perform the subdivision of the NURBS and write the result in a VRML file.
os | the ostream to write to | |
tolerance | the accepted tolerance |
void PLib::NurbsSubSurface< T >::drawSubdivisionVRML | ( | const char * | f, | |
T | tolerance, | |||
const Color & | col = Color(0,0,255) | |||
) |
perform the subdivision of the NURBS and write the result in a VRML file.
f | the file name to write to | |
tolerance | the accepted tolerance |
void PLib::NurbsSubSurface< T >::drawSubdivisionVRML97 | ( | ostream & | os, | |
T | tolerance, | |||
const Color & | col = Color(0,0,255) | |||
) |
perform the subdivision of the NURBS and write the result in a VRML file.
os | the ostream to write to | |
tolerance | the accepted tolerance |
void PLib::NurbsSubSurface< T >::drawSubdivisionVRML97 | ( | const char * | f, | |
T | tolerance, | |||
const Color & | col = Color(0,0,255) | |||
) |
perform the subdivision of the NURBS and write the result in a VRML file.
f | the file name to write to | |
tolerance | the accepted tolerance |
void PLib::NurbsSubSurface< T >::drawSubdivisionPoints | ( | BasicArray< Point_nD< T, 3 > > & | pnts, | |
T | tolerance | |||
) |
perform the subdivision of the NURBS and write the result in a VRML file.
os | the ostream to write to | |
tolerance | the accepted tolerance |
void PLib::NurbsSubSurface< T >::drawSubdivision | ( | T | tolerance | ) | [protected] |
Draw the subdivision of the NURBS surface.
Draw the subdivision of the NURBS surface
tolerance | the accepted tolerance |
void PLib::NurbsSubSurface< T >::initSurf | ( | ) | [protected] |
initialise the subdivision surface
tolerance | the accepted tolerance |