<html> <head><title>ClanLib Reference: CL_BezierSurface</title></head> <body text=black link=blue vlink=#800080 bgcolor=white topmargin=0 leftmargin=0> <table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td><img border=0 src="../images/eyeheader-main-purple-a.gif" alt="ClanSoft logo" width=525 height=96></td></tr> <tr bgcolor=#dadada><td align=left valign=top><img border=0 src="../images/eyeheader-main-purple-b.gif" alt="ClanSoft logo" width=190 height=14></td><td align=right valign=top><img border=0 src="../images/clanlib_light.gif" width=42 height=14></td></tr></table> <table align=center border=0 cellspacing=10> <tr> <td><a href="entire_class_index.html">Entire Class Index</a></td> <td><a href="class_index.html">Main Class Index</a></td> <td><a href="cross_index.html">Cross Index</a></td> <td><a href="global_index.html">Global Index</a></td> </table><h1 align=center>Class CL_BezierSurface</h1><p> <b> Class for Bezier surfaces</b><br> Contained in: <a href="global_index.html">global</a><br> Derived from: <i>none</i> <br> Derived by: <i>none</i> <br>Group: Core (Math) <p> #include <ClanLib/core.h> <p> <hr noshade> <table border=0> <tr><td colspan=3><h3>public function member index:</h3></td> <tr valign=top><td align=left><h3>Construction:</h3></td> <tr valign=top><td align=right><tt></tt> </td><td align=right><a href="CL_BezierSurface.html#735"><tt><font color=blue><b>CL_BezierSurface</b></font></tt></a></td><td><tt>(<tt>const</tt> <a href="CL_Vector.html"><tt><font color=navy><b>CL_Vector</b></font></tt></a>* <tt><font color=blue>cp</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>xs</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>ys</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>xsteps</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>ysteps</font></tt>, <tt><font color=purple>bool</font></tt> <tt><font color=blue>stepping</font></tt> = true)</tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> </tt> </td><td align=right><a href="CL_BezierSurface.html#736"><tt><font color=blue><b>~CL_BezierSurface</b></font></tt></a></td><td><tt>()</tt>;</td> <tr valign=top><td align=left><h3>Attributes:</h3></td> <tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_BezierSurface.html#737"><tt><font color=blue><b>get_xsteps</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_BezierSurface.html#738"><tt><font color=blue><b>get_ysteps</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_BezierSurface.html#739"><tt><font color=blue><b>get_xs</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>int</font></tt></tt> </td><td align=right><a href="CL_BezierSurface.html#740"><tt><font color=blue><b>get_ys</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>bool</font></tt></tt> </td><td align=right><a href="CL_BezierSurface.html#741"><tt><font color=blue><b>get_stepping</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> <a href="CL_Vector.html"><tt><font color=navy><b>CL_Vector</b></font></tt></a>*</tt> </td><td align=right><a href="CL_BezierSurface.html#742"><tt><font color=blue><b>get_surface</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> <a href="CL_Vector.html"><tt><font color=navy><b>CL_Vector</b></font></tt></a>*</tt> </td><td align=right><a href="CL_BezierSurface.html#743"><tt><font color=blue><b>get_control_points</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=left><h3>Operations:</h3></td> <tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_BezierSurface.html#744"><tt><font color=blue><b>set_xsteps</b></font></tt></a></td><td><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>xsteps</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_BezierSurface.html#745"><tt><font color=blue><b>set_ysteps</b></font></tt></a></td><td><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>ysteps</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_BezierSurface.html#746"><tt><font color=blue><b>set_stepping</b></font></tt></a></td><td><tt>(<tt><font color=purple>bool</font></tt> <tt><font color=blue>stepping</font></tt>)</tt>;</td> <tr valign=top><td align=left><h3>Operators:</h3></td> <tr valign=top><td align=right><tt><a href="CL_Vector.html"><tt><font color=navy><b>CL_Vector</b></font></tt></a></tt> </td><td align=right><a href="CL_BezierSurface.html#747"><tt><font color=black><b>operator</b></font></tt><tt> [] </tt></a></td><td><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>n</font></tt>)</tt>;</td> <tr><td> </td><tr><td colspan=3><h3>protected function member index:</h3></td> <tr valign=top><td align=right><tt><tt>virtual</tt> <a href="CL_Vector.html"><tt><font color=navy><b>CL_Vector</b></font></tt></a></tt> </td><td align=right><a href="CL_BezierSurface.html#733"><tt><font color=blue><b>evaluate</b></font></tt></a></td><td><tt>(<tt><font color=purple>float</font></tt>, <tt><font color=purple>float</font></tt>, <tt><font color=purple>int</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="CL_BezierSurface.html#734"><tt><font color=blue><b>make_surface</b></font></tt></a></td><td><tt>()</tt>;</td> <tr><td> </td></table> <hr noshade> <h2>Description:</h2> This class generates points on a Bezier surface from given control points<br><br> USE AT YOUR OWN RISK TILL THIS CLASS IS EXTENSIVELY TESTED!!! I WILL REMOVE THIS WARNING ONCE IT BASICALLY WORKS.<br><br> I hate documentation work and I won't document this code before any one besides me actually uses it. So if you want to use it simply write a mail on the ClanLib User list and I will do what I can :-)<br><br> 1999/12/30 vogel renamed CL_Bezier to <a href="CL_BezierCurve.html">CL_BezierCurve</a><br> added <a href="CL_BezierSurface.html">CL_BezierSurface</a><br><br> 1999/07/07 vogel initial version<br><br><br> BezierCurve TODO: <br><br> - length and stepping per curve<br><br> stepping per curve means that the generated points are equidistant to each other and this requires get_length() working. So at the moment all that is working is having 'n' equidistant points per segment.<br><br> same applies to BezierSurface.<br><p> <hr noshade> <h2>Function Member Descriptions:</h2> <a name="735"><font size=+1><b>CL_BezierSurface::CL_BezierSurface</b></font></a> - Constructor<br><tt></tt> <a href="CL_BezierSurface.html#735"><tt><font color=blue><b>CL_BezierSurface</b></font></tt></a><tt>(<tt>const</tt> <a href="CL_Vector.html"><tt><font color=navy><b>CL_Vector</b></font></tt></a>* <tt><font color=blue>cp</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>xs</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>ys</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>xsteps</font></tt>, <tt><font color=purple>int</font></tt> <tt><font color=blue>ysteps</font></tt>, <tt><font color=purple>bool</font></tt> <tt><font color=blue>stepping</font></tt> = true)</tt>;<br><blockquote> cp - an array of control points with size (16 * xs * ys)<br> xs - number of surface segments on x direction<br> ys - number of surface segments on y direction<br> xsteps - number of points to generate on x direction<br> ysteps - number of points to generate on x direction<br> stepping - whether steps is the number of points per segment or per surface. </blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="743"><font size=+1><b>CL_BezierSurface::get_control_points</b></font></a> - Returns the 16 * xs * ys control points<br><tt><tt>virtual</tt> <a href="CL_Vector.html"><tt><font color=navy><b>CL_Vector</b></font></tt></a>*</tt> <a href="CL_BezierSurface.html#743"><tt><font color=blue><b>get_control_points</b></font></tt></a><tt>() <tt>const</tt></tt>;<br><blockquote> Returns - the 16 * xs * ys control points</blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="741"><font size=+1><b>CL_BezierSurface::get_stepping</b></font></a> - Returns whether steps is the number of points per segment or per curve.<br><tt><tt>virtual</tt> <tt><font color=purple>bool</font></tt></tt> <a href="CL_BezierSurface.html#741"><tt><font color=blue><b>get_stepping</b></font></tt></a><tt>() <tt>const</tt></tt>;<br><blockquote> Returns - stepping</blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="742"><font size=+1><b>CL_BezierSurface::get_surface</b></font></a> - Nak Nak - don't expect it to be implemented too soon...<br> Returns the length of a segment (or the surface)<br> Returns an array of xs * xsteps * ys * ysteps CL_Vectors -> the surface<br><tt><tt>virtual</tt> <a href="CL_Vector.html"><tt><font color=navy><b>CL_Vector</b></font></tt></a>*</tt> <a href="CL_BezierSurface.html#742"><tt><font color=blue><b>get_surface</b></font></tt></a><tt>() <tt>const</tt></tt>;<br><blockquote> Returns - the curve (xs * xsteps * ys * ystepes CL_Vectors)</blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="739"><font size=+1><b>CL_BezierSurface::get_xs</b></font></a> - Returns the number of steps<br> Returns the number of surface segments<br><tt><tt>virtual</tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_BezierSurface.html#739"><tt><font color=blue><b>get_xs</b></font></tt></a><tt>() <tt>const</tt></tt>;<br><blockquote> Returns - number of surface segments</blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="737"><font size=+1><b>CL_BezierSurface::get_xsteps</b></font></a> - Returns the number of steps<br><tt><tt>virtual</tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_BezierSurface.html#737"><tt><font color=blue><b>get_xsteps</b></font></tt></a><tt>() <tt>const</tt></tt>;<br><blockquote> Returns - number of steps</blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="740"><font size=+1><b>CL_BezierSurface::get_ys</b></font></a> - Returns the number of surface segments<br><tt><tt>virtual</tt> <tt><font color=purple>int</font></tt></tt> <a href="CL_BezierSurface.html#740"><tt><font color=blue><b>get_ys</b></font></tt></a><tt>() <tt>const</tt></tt>;<br><blockquote> Returns - number of surface segments</blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="747"><font size=+1><b>CL_BezierSurface::operator [] </b></font></a> - Returns the n-th vector of the curve (_doesn't_ return a reference)<br><tt><a href="CL_Vector.html"><tt><font color=navy><b>CL_Vector</b></font></tt></a></tt> <a href="CL_BezierSurface.html#747"><tt><font color=black><b>operator</b></font></tt><tt> [] </tt></a><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>n</font></tt>)</tt>;<br><blockquote> n - the vector to return (counting starts at 0)<br> Returns - the n-th vector of the curve (_doesn't_ return a reference)</blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="746"><font size=+1><b>CL_BezierSurface::set_stepping</b></font></a> - Sets the stepping<br><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt></tt> <a href="CL_BezierSurface.html#746"><tt><font color=blue><b>set_stepping</b></font></tt></a><tt>(<tt><font color=purple>bool</font></tt> <tt><font color=blue>stepping</font></tt>)</tt>;<br><blockquote> stepping - whether steps is the number of points per segment or per curve.</blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="744"><font size=+1><b>CL_BezierSurface::set_xsteps</b></font></a> - Sets the number of steps<br><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt></tt> <a href="CL_BezierSurface.html#744"><tt><font color=blue><b>set_xsteps</b></font></tt></a><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>xsteps</font></tt>)</tt>;<br><blockquote> steps - number of steps</blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="745"><font size=+1><b>CL_BezierSurface::set_ysteps</b></font></a> - Sets the number of steps<br><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt></tt> <a href="CL_BezierSurface.html#745"><tt><font color=blue><b>set_ysteps</b></font></tt></a><tt>(<tt><font color=purple>int</font></tt> <tt><font color=blue>ysteps</font></tt>)</tt>;<br><blockquote> steps - number of steps</blockquote> <hr size="1" width="70%" align="left" noshade="noshade"><br><br> <a name="736"><font size=+1><b>CL_BezierSurface::~CL_BezierSurface</b></font></a> - Destructor<br><tt><tt>virtual</tt> </tt> <a href="CL_BezierSurface.html#736"><tt><font color=blue><b>~CL_BezierSurface</b></font></tt></a><tt>()</tt>;<hr size="1" width="70%" align="left" noshade="noshade"><br><br> <hr noshade> <h2>Variable Member Descriptions:</h2> <hr noshade> </body> </html>