32 #ifndef BezierSurface_INCLUDE_ONCE 33 #define BezierSurface_INCLUDE_ONCE 54 VL_DEBUG_SET_OBJECT_NAME()
59 VL_DEBUG_SET_OBJECT_NAME()
64 void resize(
int x,
int y);
66 int x()
const {
return mX; }
68 int y()
const {
return mY; }
70 Points&
points() {
return mControlPoints; }
72 const Points&
points()
const {
return mControlPoints; }
74 vec3&
at(
int i,
int j) {
return mControlPoints[i + mX*j]; }
76 const vec3&
at(
int i,
int j)
const {
return mControlPoints[i + mX*j]; }
102 VL_DEBUG_SET_OBJECT_NAME()
106 std::vector< ref<BezierPatch> >&
patches() {
return mPatches; }
108 const std::vector< ref<BezierPatch> >&
patches()
const {
return mPatches; }
114 unsigned detail()
const {
return mDetail; }
120 void updateBezierSurface(
bool gen_tex_coords=
true);
const std::vector< ref< BezierPatch > > & patches() const
Returns the Bézier patches that are part of this Bézier surface.
std::vector< ref< BezierPatch > > mPatches
int x() const
Returns the x dimension of the patch as specified by resize().
std::vector< vec3 > Points
The control points grid defining the bicubic Bézier patch(es).
vec3 & at(int i, int j)
Returns the i/j control point.
unsigned detail() const
The sampling level of the patch, must not be less than 2. The higher the sampling level...
#define VL_INSTRUMENT_CLASS(ClassName, BaseClass)
The Geometry class is a Renderable that implements a polygonal mesh made of polygons, lines and points.
Points & points()
The control points grid defining the bicubic Bézier patch(es).
Visualization Library main namespace.
int y() const
Returns the y dimension of the patch as specified by resize().
Defines one or more concatenated bicubic Bézier patches to be used with the BezierSurface class...
The base class for all the reference counted objects.
The BezierSurface class implements a Geometry that is capable of visualizing multiple bicubic Bézier ...
void setDetail(unsigned i)
The sampling level of the patch, must not be less than 2. The higher the sampling level...
std::vector< ref< BezierPatch > > & patches()
Returns the Bézier patches that are part of this Bézier surface.
BezierPatch(int x, int y)
Constructor.
#define VLGRAPHICS_EXPORT
BezierPatch()
Constructor.
const Points & points() const
The control points grid defining the bicubic Bézier patch(es).
const vec3 & at(int i, int j) const
Returns the i/j control point.
BezierSurface()
Constructor.