Legacy Mesh Modifier

From K-3D

Jump to: navigation, search
Note: This article contains information specific to K-3D prior to version 0.7. This information is obsolete and is retained for historical reference only.

Note: this information is obsoleted by Array Based Mesh Design, which should be used for all new code.

A mesh modifier is any node that an input mesh property and an output mesh property, and "filters" the input to produce a modified output mesh. Those properties are named input_mesh and output_mesh.

In a world of manual property connections, all that's required is an object with a couple of mesh properties - names don't matter. In practice, the user interface layer has to have some way to know in advance which objects are capable of being mesh modifiers, and which properties to use as input/output.

The API exposes the k3d::imesh_source and k3d::imesh_sink interfaces for this reason; most mesh modifiers are nodes that implement both. There are exceptions - MergeMesh is a good example, since it's a node that accepts two mesh inputs and produces a single mesh output.

In the K3DSDK, k3d::mesh_modifier<> is a convenience template that implements k3d::imesh_source and k3d::imesh_sink.

See also k3d::mesh_source<>, k3d::bitmap_source<>, and k3d::bitmap_modifier<>.

Personal tools