RenderWare V2.1

Previous Page Index Next Page

RwClump *

RwSphericalTexturizeClump(RwClump *clump);

Description

Sets the texture coordinates for every polygon belonging to the clump using the spherical projection method.

A spherical mapping results in the construction of a nominal sphere onto which the texture is applied in a way similar to the projection of a two dimensional atlas map onto the surface of a globe. The resulting sphere is then mapped to the clump by "shrink wrapping" the clump with the sphere.

Arguments

clump Pointer to the clump.

Return Value

The argument clump if successful, and NULL otherwise.

Comments

This function need only be called the first time a clump is textured and not each time the clump is rendered.

Note that this function does not set the textures associated with the clump’s polygons; this must be accomplished separately. The following code fragment illustrates this procedure:

RwForAllPolygonsInClumpPointer(clump,
(RwPolygon3d*( *)())RwSetPolygonTexture, texture);

See Also

RwCubicTexturizeClump()

RwForAllPolygonsInClump()

RwGetClumpVertexUV()

RwGetPolygonUV()

RwSetClumpVertexUV()

RwSetPolygonTexture()

RwSetPolygonUV()