SunPHIGS 3.0 Extensions Reference Manual
この本のみを検索
PDF 文書ファイルをダウンロードする

NAME

INQUIRE PREDEFINED LIGHT SOURCE REPRESENTATION - inquire for predefined light source representation

SYNOPSIS

C Syntax

void
pinq_pred_light_src_rep ( type, index, error_ind, bundle )
Pwstype              type;         workstation type
Pint                 index;        predefined index
Pint                 * error_ind;  OUT error indicator
Plight_src_bundle    * bundle;     OUT predefined light source representation

FORTRAN Syntax

SUBROUTINE pqplsr ( WKTYPE, ILS, MLDR, ERRIND, LSTYPE, LDR, DATREC )
INTEGER              WKTYPE            workstation type
INTEGER              ILS               index into predefined light source list
INTEGER              MLDR              dimension of data record array
INTEGER              ERRIND            OUT error indicator
INTEGER              LSTYPE            OUT light source type
INTEGER              LDR               OUT actual size of the data record
CHARACTER* 80        DATREC(LDR)       OUT data record

Required PHIGS Operating States

(PHOP, * ,* ,* )

DESCRIPTION

Purpose

INQUIRE PREDEFINED LIGHT SOURCE REPRESENTATION inquires for an entry in the predefined light source table of a specified workstation type's workstation description table.
This is a SunPHIGS Extension function based on PHIGS PLUS and is not part of the PHIGS standard.

C Input Parameters

type
The workstation type.
index
Index of the predefined entry to be returned.

C Output Parameters

error_ind
A pointer to the location in which to store the error number of any error that this function detects.
bundle
A pointer to the location in which to return the light source representation. The Plight_src_bundle data structure contains values needed to define the specified type of light source representation. Plight_src_bundle is defined as:
typedef struct {
Pint            type;   /* light source type * /
Plight_src_rec  rec;    /* light source data record * /

} Plight_src_bundle;
Plight_src_rec is defined as:
typedef union {
Pamb_light_src_rec
ambient;
Pdir_light_src_rec
directional;
Ppos_light_src_rec
positional;
Pspot_light_src_rec
spot;
} Plight_src_rec;
Pamb_light_src_rec is defined as:
typedef struct {
Pgcolr
colr;
/* light source colour * /
} Pamb_light_src_rec;
Pdir_light_src_rec is defined as:
typedef struct {
Pgcolr   colr;  /* light source colour * /
Pvec3    dir;   /* light source direction * /

} Pdir_light_src_rec;
Ppos_light_src_rec is defined as:
typedef struct {
Pgcolr    colr;     /* light source colour * /
Ppoint3   pos;      /* light source position * /
Pfloat     coef[2];  /* attenuation coefficients * /

} Ppos_light_src_rec;
Pspot_light_src_rec is defined as:
typedef struct {
Pgcolr    colr;     /* light source colour * /
Ppoint3   pos;      /* light source position * /
Pvec3     dir;      /* light source direction * /
Pfloat     exp;      /* concentration exponent * /
Pfloat     coef[2];  /* attenuation coefficients * /
Pfloat     angle;    /* spread angle * /

} Pspot_light_src_rec;
Pgcolr is defined as:
typedef struct {
Pint
type;
/* indirect, RGB, CIE, HSV, HLS * /
union {
Pint
ind;
/* index in workstation colour
bundle table * /
struct {
Pfloat x;
/* red, hue, and so on * /
Pfloat y;
/* green, saturation, lightness, and
so on * /
Pfloat z;
/* blue, value, saturation, and so on * /
} general;
} val;
} Pgcolr;
Pvec3 is defined as:
typedef struct {
Pfloat   delta_x;   /* x magnitude * /
Pfloat   delta_y;   /* y magnitude * /
Pfloat   delta_z;   /* z magnitude * /

} Pvec3;
Ppoint3 is defined as:
typedef struct {
Pfloat   x;   /* x coordinate * /
Pfloat   y;   /* y coordinate * /
Pfloat   z;   /* z coordinate * /

} Ppoint3;

FORTRAN Input Parameters

WKTYPE
The workstation type for which the predefined light source representation is being inquired.
ILS
The index of the predefined entry to be returned.
MLDR
The dimension of the data record array, DATREC.

FORTRAN Output Parameters

ERRIND
A pointer to the location to store the error number of any error detected by this function.
LSTYPE
The light source type.
LDR
The actual size, in elements, returned in the data record.
DATREC(LDR)
The data record that must be unpacked by UNPACK DATA RECORD. The contents depend on the light source type. See SET LIGHT SOURCE REPRESENTATION for a description of its contents.

Execution

If the inquired information is available, then the error indicator is returned as zero, and values are returned in the output parameters.
See SET LIGHT SOURCE REPRESENTATION for the defined data record formats that can be returned in the data record parameter.
If the inquired information is not available, then the values returned in the output parameters are undefined, and the error indicator is set to one of the error numbers below to indicate the reason for nonavailability.
Since this is an inquiry function, ERROR HANDLING is not invoked when this function detects an error.

ERRORS

002
Ignoring function, function requires state (PHOP, * ,* ,* )
051
Ignoring function, this information unavailable for this workstation type
052
Ignoring function, workstation type not recognized by the implementation
062
Ignoring function, this information is not available for this MO workstation type
102
Ignoring function, specified representation has not been predefined on this workstation
614
Ignoring function, the general interior index is less than one

SEE ALSO

SET LIGHT SOURCE REPRESENTATION (3PP)
SET LIGHT SOURCE STATE (3PP)
INQUIRE LIST OF LIGHT SOURCE INDICES (3PP)
INQUIRE LIGHT SOURCE REPRESENTATION (3PP)
INQUIRE LIGHT SOURCE FACILITIES (3PP)