Generic Mesh Lab (sweep)

What's Happening

One of the most exciting new features of Web Driver 3.0 is the generic mesh object. A generic mesh is a new flavor of WTModel that allows you to create geometry on the fly by defining vertices, polygons, vertex normals, and UV coordinates.

The scene above lets you create a generic mesh by using one of the most powerful methods in the generic mesh API, sweep. This method allows you to turn a series of vertices into a revolved mesh by sweeping them through some angle. You may know this type of geometry as a "lathe" or "surface of revolution."

In the scene above, click to create new vertices. If you want to move a vertex once it's been created, just drag it. When you are finished placing your vertices, fill in the attributes and click the "Sweep" button. These attributes are the parameters of the sweep method. A mesh is created by sweeping the vertices around the axis (red line). Finally, drag the mouse to spin the model and use +/- to scale.

Key Methods Used

WT::createBlankMesh, WTModel::addVertex, WTModel::sweep, WTModel::updateNormals

Points to Remember