Menu - Top - Home - Donate to Me

H3DU.CurveBuilder

Back to documentation index.

H3DU.CurveBuilder()

An evaluator of curve evaluator objects for generating vertex attributes for a curve.

For more information, see the Parametric Curves and Parametric Surfaces tutorial.

Methods

H3DU.CurveBuilder#attribute(curve, semantic, semanticIndex, [size])

Sets the parametric curve used to generate vertex attribute values.

Parameters

Return Value

This object. (Type: H3DU.CurveBuilder)

H3DU.CurveBuilder#clearVertices()

Clears the arrays of attribute values (such as positions and normals) and vertex indices generated so far. The attributes themselves will remain.

Return Value

This object. (Type: H3DU.CurveBuilder)

(static) H3DU.CurveBuilder.curveToBuffer(curve, [mode], [n], [u1], [u2])

Convenience method for creating a mesh buffer from a parametric curve. The mesh buffer will contain positions and vertex normals that cover the given surface.

Parameters

Return Value

The generated mesh buffer. (Type: H3DU.MeshBuffer)

H3DU.CurveBuilder#evalCurve([mode], [n], [u1], [u2])

Generates the vertex attributes of the parametric curves.

Parameters

Return Value

This object. (Type: H3DU.CurveBuilder)

H3DU.CurveBuilder#position(curve, [size])

Sets the parametric curve used to generate vertex positions.

Parameters

Return Value

This object. (Type: H3DU.CurveBuilder)

H3DU.CurveBuilder#toMeshBuffer()

Generates a mesh buffer containing the vertex attributes generated so far. The mesh buffer's primitive type will equal the last type passed to the "mode" parameter in the H3DU.CurveBuilder.curveEval method.

Return Value

The generated mesh buffer. (Type: H3DU.MeshBuffer)

Back to documentation index.