DoTextureIntermediateSurf(3D)

NAME
DoTextureIntermediateSurf - Create an intermediate surface texture attribute object for two-part texture mapping

SYNOPSIS
C:
DtObject DoTextureIntermediateSurf(surface_object,
	projection_type)
DtObject surface_object;
Dt2PartProjType projection_type;

FORTRAN:
INTEGER*4 DOTIMS(SRFOBJ, PRJTYP)
INTERNAL SRFOBJ
INTEGER*4 PRJTYP

DESCRIPTION
DoTextureIntermediateSurf creates an intermediate surface texture attribute object for two-part texture mapping.

Two-part mapping occurs when you use DoTextureMapDiffuseColor <DOTMDC> to set the parameter mapping to Dc2PartMap <DC2PM>. A two-dimensional tabular texture is then mapped onto a target object in two steps. The two-dimensional texture is first mapped onto a relatively simple three-dimensional surface. This intermediate surface is sized and positioned relative to the target object and the texture is projected from there onto the target object.

The parameter surface_object specifies which intermediate surface object to map the texture onto. Surface_object can be a DoPrimSurf <DOPMS> object or a DoSimplePolygon <DOSPGN> object.

The parameter projection_type specifies the type of projection to use between the intermediate surface and the target object. Possible values for projection_type are:

DcObjCentroid <DCOCTR>
    the point on the intermediate surface which is projected onto a particular target point is determined by following a line from the target object's centroid through the point being rendered, until it reaches the intermediate surface. Do not use this mapping when the intermediate surface is a simple polygon.

DcISN <DCISN>
    a point on the intermediate surface is projected onto all points on the target object that fall on a line from that intermediate surface point in the direction of its surface normal. In the case where multiple intermediate surface points project onto the same target point, only one is used. Usually, depending on the renderer, it is the intermediate surface point closest to the target point, in the direction of the target point's normal.

While texture coordinates are not used for the target object, they are used for mapping the two-dimensional texture onto the intermediate surface, as are the texture attributes for specifying the (u,v) index, the texture coordinate transformations, and the extend modes. The DoCompTextureUVCallback <DOCTVC> attribute is used to determine the parameterization of the intermediate surface if it is a DoPrimSurf <DOPMS> object.

The intermediate surface is sized and positioned relative to the target object using the geometric transformation attributes (DoTranslate <DOXLT>, etc.).

DEFAULTS
The defaults for DoTextureIntermediateSurf are (DoPrimSurf(DcSphere), DcObjCentroid).

SEE ALSO
DoCompTextureUVCallback(3D), DoPrimSurf(3D), DoTextureExtendUV(3D), DoTextureMapBump(3D), DoTextureMapDiffuseColor(3D), DoTextureMapEnviron(3D), DoTextureMapTranspIntens(3D) DoTextureMatrixUV(3D), DoTextureScaleUV(3D), DoTextureTranslateUV(3D)