CBezier3 Class Reference
Collaboration diagram for CBezier3:
[legend]List of all members.
Detailed Description
The bezier patch class uses a 3rd degree function to calculate a patch using 4x4 control points. The patch will touch the four outer control points. The rest of the control points will affect the shape of the patch.
void add_bezier(CBsp& bsp) {
CBezier3 bezier;
bezier.p[0][0].set(-1.0, -1.0, -1.0);
bezier.p[3][0].set(+1.0, -1.0, -1.0);
bezier.p[3][3].set(+1.0, +1.0, -1.0);
bezier.p[0][3].set(-1.0, +1.0, -1.0);
bezier.generate(10);
bezier.to_mesh(bsp);
}
Definition at line 55 of file CBezier.h.
Constructor & Destructor Documentation
Member Function Documentation
void CBezier3::generate |
( |
int |
a_resolution = 7 |
) |
|
|
|
Generates the output grid. The grid will be resolution*resolution sized. If resolution <= 0, all memory will be freed instead. - Parameters:
-
| resolution | The resolution of the generated patch. The generated patch will have resolution*resolution points. |
|
void CBezier3::translate |
( |
CVector |
delta |
) |
|
|
|
Translates all control points by the specified vector. You will need to regenerate to update the output grid. - Parameters:
-
| delta | The delta vector will be added to all 4x4 control points. |
|
void CBezier3::toMesh |
( |
CMesh & |
mesh |
) |
|
|
|
Outputs the generated points as triangles. - Parameters:
-
| mesh | Target mesh to output triangles. |
|
The documentation for this class was generated from the following file:
Generated on Tue Feb 8 21:59:30 2005 for MarSTDv2004 by
1.4.1