Menu - Top - Home - Donate to Me

H3DU.SurfaceEval

Back to documentation index.

H3DU.SurfaceEval()

An evaluator of parametric functions for generating vertex attributes of a surface.

See the Parametric Curves and Parametric Surfaces tutorial for more information.

Parameters

Methods

H3DU.SurfaceEval#color(evaluator)

Specifies a parametric surface function for generating color values.

Parameters

Return Value

This object. (Type: H3DU.SurfaceEval)

H3DU.SurfaceEval#evalOne(mesh, u, v)

Generates vertex positions and attributes based on a point in a parametric surface.

Parameters

Return Value

This object. (Type: H3DU.SurfaceEval)

H3DU.SurfaceEval#evalSurface(mesh, [mode], [un], [vn], [u1], [u2], [v1], [v2])

Generates the vertex positions and attributes of a parametric surface.

Parameters

Return Value

This object. (Type: H3DU.SurfaceEval)

H3DU.SurfaceEval#normal(evaluator)

Deprecated: Use the "vertex" method instead, specifying an object that implements a method named "gradient".

Specifies a parametric surface function for generating normals.

Parameters

Return Value

This object. (Type: H3DU.SurfaceEval)

H3DU.SurfaceEval#setAutoNormal(value)

Deprecated: In the future, this class may always generate normals, rendering this method unnecessary. You should use the "vertex" method, specifying an object that implements a method named "gradient".

Sets whether this object will automatically generate normals rather than use the parametric evaluator specified for normal generation, if any. By default, normals won't be generated automatically.

Parameters

Return Value

This object. (Type: H3DU.SurfaceEval)

H3DU.SurfaceEval#texCoord(evaluator)

Specifies a parametric surface function for generating texture coordinates.

Parameters

Return Value

This object. (Type: H3DU.SurfaceEval)

Example

The following example sets the surface function to a linear evaluator. Thus, coordinates passed to the evalOne and evalSurface methods will be interpolated as direct texture coordinates.

surface.texCoord({"evaluate":function(u,v) {
"use strict"; return [u,v] }});

H3DU.SurfaceEval#vertex(evaluator)

Specifies a surface evaluator object for generating the vertex positions of a parametric surface.

Parameters

Return Value

This object. (Type: H3DU.SurfaceEval)

Back to documentation index.