PSRFP(3g) — Subroutines
Name
PSRFP − Sets the surface properties of the front-facing portions of area primitives.
Operating States: PHOP, ∗, STOP, ∗
PHIGS PLUS function
Creates a structure element
Old Syntax
DSAP (AMB, DIFF, SPEC, SPCCT, ICOLR, COLR SPECXP, TRANS)
Argument Data Type Access Description
---------------------------------------------------------------------------
AMB Real Read Ambient reflection coefficient
DIFF Real Read Diffuse reflection coefficient
SPEC Real Read Specular reflection coefficient
SPCCT Integer Read Specular color type
ICOLR Integer Read Specular indexed color
COLR(3) Array of Read Specular direct color
reals
SPECXP Real Read Specular exponent
TRANS Real Read Transparency coefficient
---------------------------------------------------------------------------
New Syntax
PSRFP (RPTYPE, LDR, DATREC)
Argument Data Type Access Description
---------------------------------------------------------------------------
RPTYPE Integer Read Reflectance properties type
LDR Integer Read Length of the data record array
DATREC(LDR) Character ∗80 Read Data record
---------------------------------------------------------------------------
Constants
Defined Argument Constant Description
---------------------------------------------------------------------------
RPTYPE PSRPT Simple reflectance
CTYPE PINDIR Indirect (indexed) color
PRGB Direct specification of red, green, and
blue
PCIE Direct specification in the format of the
Commission Internationale de l’Eclairage
PHSV Direct specification of hue, saturation,
and value
PHLS Direct specification of hue, lightness,
and saturation
---------------------------------------------------------------------------
Description
PSRFP sets the surface properties of the front-facing portions of area primitives. The argument values specified by this function help to define the lighting calculation that Digital PHIGS conceptually applies at one or more points on the front-facing areas of the primitive being illuminated and shaded. The aspects defined by the PSIC function also affect the front-facing areas. These aspects, in conjunction with the face-processing mode, determine the appearance of the surface.
Depending on the current edit mode, this function either inserts the new structure element directly after the element indicated by the pointer or replaces the element indicated by the pointer. The pointer then points to the new set reflectance properties element.
If Digital PHIGS is in immediate mode, it performs this function immediately, but the function does not create a structure element.
The new function syntax conforms to the ISO Fortran standard. Digital recommends that you code using the new function syntax.
Data Record Information
If RPTYPE is PSRPT, the data record is as follows:
INTEGER IL = 2+∗ Number of integer elements
INTEGER IA(1) = Color type
INTEGER IA(2) = Number of color value components (NCC)
INTEGER RL = 4+∗ Number of real elements
REAL RA(1) = Ambient reflection coefficient
REAL RA(2) = Diffuse reflection coefficient
REAL RA(3) = Specular reflection coefficient
REAL RA(4) = Specular exponent
REAL RA(5) = Transparency coefficient (optional)
SL = 0
LSTR = ()
STR = ()
If the color type is PINDIR:
IA(3) = Specular color index
If the color type is PRGB, PCIE, PHSV, or PHLS:
RA = Elements 5 through 4+NCC contain the color values
See Also
PCA
PCA3
PCA3P
PFA
PFA3
PFAS
PFAS3
PFASD
PFAS3D
DFASW
DFASW3
DFAW
DFAW3
PQIFP
PBSS3
PQM3D
PSBRFP
PSIASF
PSIC
PSII
PSIR
PSIP
PSFAS3
PSRFM
PTST3D