#include <sglBezierCurveSet.hpp>
Inheritance diagram for sglBezierCurveSet::
Public Methods | |
sglBezierCurveSet () | |
virtual | ~sglBezierCurveSet () |
void | setTexCoordBind (BindEnum bind) |
BindEnum | getTexCoordBind () const |
void | setCoordOrder (GLint order=4) |
void | setTexCoordOrder (GLint order=4) |
void | setNormalOrder (GLint order=4) |
void | setColorOrder (GLint order=4) |
GLint | getCoordOrder () |
GLint | getTexCoordOrder () |
GLint | getNormalOrder () |
GLint | getColorOrder () |
void | setRange (float min=0, float max=1.0f) |
void | getRange (float &min, float &max) |
void | setNumSegments (unsigned int num) |
unsigned int | getNumSegments () |
virtual void | drawGeometry (const vector< sglTexCoords > &tex_coords) const |
sglStats::PrimEnum | getPrimType () const |
GLenum | getGLPrimType () const |
unsigned int | getPrimSize () const |
AAEnum | getAAType () const |
Protected Methods | |
virtual bool | computeBounds () |
virtual void | updateDrawFunc () |
Protected Attributes | |
GLint | m_vorder |
GLint | m_norder |
GLint | m_corder |
GLint | m_torder |
float | m_min |
float | m_max |
unsigned int | m_segments |
Static Protected Attributes | |
Map1Func | s_vfunc_table [24] |
Map1Func | s_nfunc_table [8] |
Map1Func | s_cfunc_table [16] |
Map1Func | s_tfunc_table [32] |
Note: The BindEnum's for BezierCurves have different meanings than for other sglGeoSets. \begin{description} \item[sglGeoSet::ePER_VERTEX] A different set of control points are applied to each primitive. This requires order*num_prim control points. \item[sglGeoSet::ePER_PRIM] The same set of control points is applied to each primitive. The range applied is also the same (min-max). This will create the effect of repeating the values on each primitive. This requires order control points. \item[sglGeoSet::eOVERALL] The same set of control points is applied to each primitive. The range is streched, and applied linearly across the primitives. This will have the effect of streching the values across all of the primitives. This requires order control points. \end{description}
{\bf Example:}
\begin{verbatim} sglBezierCurveSet *gset = new sglBezierCurveSet();
sglVec3f *vertex = new sglVec3f[4]; vertex[0].set(-10.0f, 0.0f, -10.0f); vertex[1].set(-08.0f, 7.0f, 10.0f); vertex[2].set( 08.0f, 0.0f, -10.0f); vertex[3].set( 10.0f, 0.0f, 10.0f);
gset->setCoordList(vertex); gset->setCoordOrder(4);
sglVec4f *color = new sglVec4f(1.0f, 0, 0, 1.0f); gset->setColorList(sglGeoSet::eOVERALL, color); gset->setColorOrder(1);
gset->setNumPrims(1); gset->setNumSegments(10); \end{verbatim}
Definition at line 77 of file sglBezierCurveSet.hpp.
|
default constructor.
|
|
virtual destructor.
|
|
order is the degree of the curve plus one (should == the number of control points/prim) |
|
get/set the range of the parametric value.
|
|
get/set the number of segments to be drawn for each curve.
|
|
draw the geometry of the bezier curve.
|
|
retrieve the primitive type.
Reimplemented from sglGeoSet. Definition at line 124 of file sglBezierCurveSet.hpp. |
|
Compute the bounding box for this geometry and fill in the member variable, m_bbox, in this class.
Reimplemented from sglGeoSet. |