[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface : Subroutine Reference

GPBSPR - Set Back Surface Properties

GPBSPR (amb, diff, spec, exp, trans)

Purpose

Use GPBSPR to insert a Set Back Surface Properties structure element into the open structure following the element pointer, or to replace the element pointed at by the element pointer with a Set Back Surface Properties structure element depending on the current edit mode.

During structure traversal, this structure element specifies the coefficients and exponents used in calculating lighting and transparency effects.

Face distinguish mode (GPFDMO) must be 2=COLOR_SURFACE_PROPERTIES for the graPHIGS API to use these values to calculate the lighting and transparency effects on the back facing portions of a surface. If face distinguish mode is 1=NONE , then the graPHIGS API uses the current surface properties to calculate the effects on the back facing portions of a surface.

The traversal default coefficients and exponent for the back surface properties are as follows:

To use the specified transparency coefficient, the transparency mode for the view must be a value other than 1=NONE The current back transparency coefficient in the graPHIGS API Traversal State List is also set by the back transparency coefficient of the Set Back Transparency Coefficient (GPBTCO) subroutine.

Parameters

amb -- specified by user, short floating-point number

Back ambient reflection coefficient (0<= amb<=1)

diff -- specified by user, short floating-point number

Back diffuse reflection coefficient (0<= diff<=1)

spec -- specified by user, short floating-point number

Back specular reflection coefficient (0<= spec<=1)

exp -- specified by user, short floating-point number

Back specular reflection exponent (>=0)

trans -- specified by user, short floating-point number

Back transparency coefficient (0<= trans<=1)

Error Codes

5
FUNCTION REQUIRES STATE STOP OR NROP (NOT STCL)
111
AMBIENT COEFFICIENT IS INVALID
112
DIFFUSE COEFFICIENT IS INVALID
113
SPECULAR COEFFICIENT IS INVALID
114
SPECULAR EXPONENT IS INVALID
115
TRANSPARENT COEFFICIENT IS INVALID

Related Subroutines

GPBRMO
Set Back Reflectance Model
GPBTCO
Set Back Transparency Coefficient
GPFDMO
Set Face Distinguish Mode
GPLMO
Set Lighting Calculation Mode
GPLSR
Set Light Source Representation
GPLSS
Set Light Source State
GPSPR
Set Surface Properties

RCP code

201343494 (X'0C004206')


[ Previous | Next | Contents | Glossary | Home | Search ]