DoCompTextureUVCallback(3D)

NAME
DoCompTextureUVCallback - Create a primitive attribute object for computing the uv texture coordinates of a nonvertex primitive

SYNOPSIS
C:
DtObject DoCompTextureUVCallback(callback_object)
DtObject callback_object;

FORTRAN:
INTEGER*4 DOCTVC(CBKOBJ)
INTEGER*4 CBKOBJ

DESCRIPTION

DoCompTextureUVCallback creates a primitive attribute object that controls the generation of texture coordinates for primitives that do not have user-provided vertex information (e.g DoTorus <DOTOR>).

The parameter callback_object can have the following values:

DcStdUVCallback <DCSUVC>
    the parameterization of the object is controlled by Dore

a DoCallback <DOCB> object handle
    the parameterization of the object is controlled by a user-defined function that was hooked into Dore as a callback using DoCallback <DOCB>

If the renderer draws the primitive as a tessellated alternate object the callback function is called for every vertex of the alternate object. In that case DoCompTextureUVSwitch <DOCTVS> must first be enabled. If the renderer draws the primitive directly it will either ignore this attribute, or call the callback function for every visible point on the object's surface. See your Dore System Guide for details of the renderers on your system.

The information passed to this function consists of user data, the coordinates of a point on the object surface in local space, and the surface normal at that point. The function computes and passes back a u and v value for that point.

In C, the user-written function must have the following format:
	my_uv_callback (data, x,y,z, nx,ny,nz, u,v)
	DtPtr data;	 /* if data is a pointer to data */
	Dt32Bits data;   /* if data is a value */
	DtReal x,y,z;    /* vertex */
	DtReal nx,ny,nz; /* vertex normal */
	DtReal *u, *v;	 /* returned u,v values */

FORTRAN, the user-defined function can be either a subroutine or a function. The format is either:

	SUBROUTINE MYUVCB (DATA, X,Y,Z, NX,NY,NZ, U,V)
	INTEGER*4 DATA
	REAL*8 X,Y,Z
	REAL*8 NX,NY,NZ
	REAL*8 U,V
or
	FUNCTION MYUVCB (DATA, X,Y,Z, NX,NY,NZ, U,V)
	INTEGER*4 DATA
	REAL*8 X,Y,Z
	REAL*8 NX,NY,NZ
	REAL*8 U,V

DEFAULTS
The default for DoCompTextureUVCallback is DcStdUVCallback.

SEE ALSO
DoCallback (3D), DoCompTextureUVSwitch(3D), DoTextureMapBump(3D), DoTextureMapDiffuseColor(3D), DoTextureMapEnviron(3D), DoTextureMapTranspIntens(3D)