#include <sglBezierSurfaceSet.hpp>
Inheritance diagram for sglBezierSurfaceSet::
Public Methods | |
sglBezierSurfaceSet () | |
virtual | ~sglBezierSurfaceSet () |
void | setTexCoordBind (BindEnum bind) |
BindEnum | getTexCoordBind () const |
void | setCoordOrder (GLint order_u=4, GLint order_v=4) |
void | setTexCoordOrder (GLint order_u=4, GLint order_v=4) |
void | setNormalOrder (GLint order_u=4, GLint order_v=4) |
void | setColorOrder (GLint order_u=4, GLint order_v=4) |
void | getCoordOrder (GLint &order_u, GLint &order_v) |
void | getTexCoordOrder (GLint &order_u, GLint &order_v) |
void | getNormalOrder (GLint &order_u, GLint &order_v) |
void | getColorOrder (GLint &order_u, GLint &order_v) |
void | setRange (float min_u=0, float max_u=1.0f, float min_v=0, float max_v=1.0f) |
void | getRange (float &min_u, float &max_u, float &min_v, float &max_v) |
void | setNumSegments (unsigned int num_u, unsigned int num_v) |
void | setNumSegments (unsigned int &num_u, unsigned int &num_v) |
virtual void | addStats (sglStats &stats) const |
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_u |
GLint | m_vorder_v |
GLint | m_norder_u |
GLint | m_norder_v |
GLint | m_corder_u |
GLint | m_corder_v |
GLint | m_torder_u |
GLint | m_torder_v |
float | m_min_u |
float | m_min_v |
float | m_max_u |
float | m_max_v |
unsigned int | m_segments_u |
unsigned int | m_segments_v |
Static Protected Attributes | |
Map2Func | s_vfunc_table [24] |
Map2Func | s_nfunc_table [8] |
Map2Func | s_cfunc_table [16] |
Map2Func | s_tfunc_table [32] |
Note: The BindEnum's for BezierSurfaces 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_u*order_v*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_u*order_v control points.
\item[sglGeoSet::eOVERALL] The same set of control points is applied to each primitive. The range (along the u dimension) 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_u*order_v control points. \end{description}
{\bf Example:} \begin{verbatim} sglBezierSurfaceSet *gset = new sglBezierSurfaceSet();
sglVec3f *vertex = new sglVec3f[16]; vertex[ 0].set(-10.0f, 0.0f, -10.0f); vertex[ 1].set(-05.0f, 7.0f, -10.0f); vertex[ 2].set( 05.0f, -7.0f, -10.0f); vertex[ 3].set( 10.0f, 0.0f, -10.0f); vertex[ 4].set(-10.0f, 0.0f, -05.0f); vertex[ 5].set(-05.0f, 7.0f, -05.0f); vertex[ 6].set( 05.0f, -7.0f, -05.0f); vertex[ 7].set( 10.0f, 0.0f, -05.0f); vertex[ 8].set(-10.0f, 0.0f, 05.0f); vertex[ 9].set(-05.0f, 7.0f, 05.0f); vertex[10].set( 05.0f, -7.0f, 05.0f); vertex[11].set( 10.0f, 0.0f, 05.0f); vertex[12].set(-10.0f, 0.0f, 10.0f); vertex[13].set(-05.0f, 7.0f, 10.0f); vertex[14].set( 05.0f, -7.0f, 10.0f); vertex[15].set( 10.0f, 0.0f, 10.0f);
gset->setCoordList(vertex); gset->setCoordOrder(4, 4);
sglVec4f *color = new sglVec4f(1.0f, 0, 0, 1.0f); gset->setColorList(SGL_OVERALL, color); gset->setColorOrder(1, 1);
gset->setNumPrims(1); gset->setNumSegments(10, 10); \end{verbatim}
Definition at line 90 of file sglBezierSurfaceSet.hpp.
|
default constructor.
|
|
virtual destructor.
|
|
order is the degree of the surface plus one (should == the number of control points/prim) |
|
get/set the range of the parametric value in the u and v dimensions.
|
|
get/set the number of segments to be drawn for each surface in the u and v dimensions. |
|
Add this drawable's stats to the given debug_stats.
Reimplemented from sglGeoSet. |
|
draw the geometry of the bezier surface.
|
|
retrieve the primitive type.
Reimplemented from sglGeoSet. Definition at line 148 of file sglBezierSurfaceSet.hpp. |
|
Compute the bounding box for this geometry and fill in the member variable, m_bbox, in this class.
Reimplemented from sglGeoSet. |