MarSTDv2004: CBezier3 Class Reference
From MarSTDv2004
Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members
CBezier3 Class Reference
Collaboration diagram for CBezier3:
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.// Example: void add_bezier(CBsp& bsp) { CBezier3 bezier; // Set corner control points. 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); // Generate 10x10 patch. bezier.generate(10); // Export to mesh. Remember that CBsp is derived from CMesh. bezier.to_mesh(bsp); }
Definition at line 55 of file CBezier.h.
Public Member Functions | |
| CBezier3 () | |
| ~CBezier3 () | |
| void | generate (int a_resolution=7) |
| void | translate (CVector delta) |
| void | toMesh (CMesh &mesh) |
Public Attributes | |
| CVector | p [4][4] |
| 4x4 grid of control points. | |
| CVector ** | v |
| Output grid points. | |
| int | resolution |
| Resolution of output grid. | |
Constructor & Destructor Documentation
|
|
Constructor. |
|
|
Destructor. |
Member Function Documentation
|
|
Generates the output grid. The grid will be resolution*resolution sized. If resolution <= 0, all memory will be freed instead.
|
|
|
Translates all control points by the specified vector. You will need to regenerate to update the output grid.
|
|
|
Outputs the generated points as triangles.
|
The documentation for this class was generated from the following file:
Generated on Tue Feb 8 21:59:30 2005 for MarSTDv2004 by