Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
#include <BezierSurface.hpp>

Public Member Functions | |
| virtual const char * | className () |
| Returns the name of the class. | |
| BezierSurface () | |
| Constructor. | |
| std::vector< ref< BezierPatch > > & | patches () |
| Returns the Bézier patches that are part of this Bézier surface. | |
| const std::vector< ref < BezierPatch > > & | patches () const |
| Returns the Bézier patches that are part of this Bézier surface. | |
| void | setDetail (unsigned i) |
| The sampling level of the patch, must not be less than 2. The higher the sampling level, the more detailed the patch will be. | |
| unsigned | detail () const |
| The sampling level of the patch, must not be less than 2. The higher the sampling level, the more detailed the patch will be. | |
| void | updateBezierSurface (bool gen_tex_coords=true) |
| Generates the Bézier surface geometry based on the current patches and detail. | |
Protected Attributes | |
| std::vector< ref< BezierPatch > > | mPatches |
| unsigned | mDetail |
From Wikipedia [http://en.wikipedia.org/wiki/Bézier_surface]:
"Bézier surfaces are a species of mathematical spline used in computer graphics, computer-aided design, and finite element modelling. As with the Bézier curve, a Bézier surface is defined by a set of control points. Similar to interpolation in many respects, a key difference is that the surface does not, in general, pass through the central control points; rather, it is "stretched" toward them as though each were an attractive force. They are visually intuitive, and for many applications, mathematically convenient."
"Bézier surfaces were first described in 1972 by the French engineer Pierre Bézier who used them to design automobile bodies. Bézier surfaces can be of any degree, but bicubic Bézier surfaces generally provide enough degrees of freedom for most applications."
See also:
| vl::BezierSurface::BezierSurface | ( | ) | [inline] |
Constructor.
| virtual const char* vl::BezierSurface::className | ( | ) | [inline, virtual] |
| std::vector< ref<BezierPatch> >& vl::BezierSurface::patches | ( | ) | [inline] |
Returns the Bézier patches that are part of this Bézier surface.
| const std::vector< ref<BezierPatch> >& vl::BezierSurface::patches | ( | ) | const [inline] |
Returns the Bézier patches that are part of this Bézier surface.
| void vl::BezierSurface::setDetail | ( | unsigned | i | ) | [inline] |
The sampling level of the patch, must not be less than 2. The higher the sampling level, the more detailed the patch will be.
| unsigned vl::BezierSurface::detail | ( | ) | const [inline] |
The sampling level of the patch, must not be less than 2. The higher the sampling level, the more detailed the patch will be.
| void BezierSurface::updateBezierSurface | ( | bool | gen_tex_coords = true |
) |
Generates the Bézier surface geometry based on the current patches and detail.
Note that this method does not recompte the normals of the mesh, this means that if you are using the OpenGL lighting or other techniques requiring vertex normals you should call computeNormals() right after calling this function.
| gen_tex_coords | If set to true the function will also generate normalized (0..1) texture coordinates. |
std::vector< ref<BezierPatch> > vl::BezierSurface::mPatches [protected] |
unsigned vl::BezierSurface::mDetail [protected] |