Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

DoCompTextureUVWSwitch(3D)

DoTextureMapBump(3D)

DoTextureMapDiffuseColor(3D)

DoTextureMapTranspIntens(3D)

DoCompTextureUVWCallback(3D)  —  Kubota Pacfic Computer Inc. (\*(Dd)

NAME

DoCompTextureUVWCallback − Create a primitive attribute object for computing the uvw texture coordinates of a nonvertex primitive

SYNOPSIS

C:

DtObject DoCompTextureUVWCallback(callback_object)
DtObject callback_object;

FORTRAN:

INTEGER∗4 DOCTWC(CBKOBJ)
INTEGER∗4 CBKOBJ

DESCRIPTION

DoCompTextureUVWCallback creates a primitive attribute object that controls the generation of uvw 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:

DcStdUVWCallback <DCSUVC>
the parameterization of the object is controlled by Doré

a DoCallback <DOCB> object handle
the parameterization of the object is controlled by a user-defined function that was hooked into Doré 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 DoCompTextureUVWSwitch <DOCTWS> 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 Doré 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, v, and w value for that point. 

In C, the user-written function must have the following format:

my_uvw_callback (data, x,y,z, nx,ny,nz, u,v,w)
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,∗w; /∗ returned u,v,w values ∗/

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

SUBROUTINE MYWCB (DATA, X,Y,Z, NX,NY,NZ, U,V,W)
INTEGER∗4 DATA
REAL∗8 X,Y,Z
REAL∗8 NX,NY,NZ
REAL∗8 U,V,W

or

FUNCTION MYWCB (DATA, X,Y,Z, NX,NY,NZ, U,V,W)
INTEGER∗4 DATA
REAL∗8 X,Y,Z
REAL∗8 NX,NY,NZ
REAL∗8 U,V,W

DEFAULTS

The default for DoCompTextureUVWCallback is DcStdUVWCallback. 

SEE ALSO

DoCallback (3D), DoCompTextureUVWSwitch(3D), DoTextureMapBump(3D), DoTextureMapDiffuseColor(3D), DoTextureMapTranspIntens(3D)

September 02, 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026