Previous Next Up Title Contents Index Functions Index Top Library

SET LIGHT SOURCE REPRESENTATION

PSET_LIGHT_SOURCE_REP


CALL SEQUENCE

void pset_light_source_rep(
)

TYPES

typedef struct {
	Pint	type;		/* light source type	*/
	union Plight_source_rep_data {
		struct Plight_source_rep_amb {
			Pgcolr	colr;
		} amb;
		struct Plight_source_rep_dir {
			Pgcolr	colr;
			Pvec3	dir;
		} dir;
		struct Plight_source_rep_pos {
			Pgcolr	colr;
			Ppoint3	pos;
			Pfloat	c1;
			Pfloat	c2;
		} pos;
		struct Plight_source_rep_spot {
			Pgcolr	colr;
			Ppoint3	pos;
			Pvec3	dir;
			Pfloat	concent_exp;
			Pfloat	c1;
			Pfloat	c2;
			Pfloat	spread_angle;
		} spot;
	} data;
} Plight_source_rep;

typedef struct {
	Pint	colr_type;	/* colour type	*/
	Pcolrv	colr_value;	/* colour value	*/
} Pgcolr;

typedef union {
	Pint	colr_ind;	/* colour index	*/
	Pcolr_rep	colr_rep;	/* colour representation	*/
} Pcolrv;

typedef union {
	Prgb	rgb;	/* red green blue colour specification	*/
	Pcieluv	cieluv;	/* CIE L*u*v* colour specification	*/
	Phls	hls;	/* hue lightness saturation colour specification	*/
	Phsv	hsv;	/* hue saturation value colour specification	*/
} Pcolr_rep;

PHIGS STATE

(PHOP, WSOP,*,*)

EFFECT

The rep values are placed in the light source bundle table at index in the workstation state list.

The light source bundle table is initialized from the ws_id workstation description table

Light source TYPES are:

PLIGHT_SOURCE_AMB ambient

PLIGHT_SOURCE_DIR directional

PLIGHT_SOURCE_POS positional

PLIGHT_SOURCE_SPOT spot

During structure traversal, the current light source state in the traversal state list is used to select zero or more entries in the light source table of a workstation. Entries in the current light source state, that are not defined in a workstation's light source table are ignored.

During structure traversal, if the colour type of any selected light source representation is indirect, and the colour index is not defined on the workstation, colour index 1 is used for that light source.

ERRORS

3
Ignoring function, function requires state (PHOP, WSOP,*,*)
54
Ignoring function, the specified workstation is not open
59
Ignoring function, the specified workstation does not have output capability (i.e. the workstation category is neither OUTPUT, OUTIN, nor MO)
103
Ignoring function, setting this bundle table entry would exceed the maximum number of entries allowed in the workstation
110
Ignoring function, the specified colour model is not available on the workstation
113
Ignoring function, the colour index value is less than zero
136
Ignoring function, one of the components of the colour specification is out of range
129
Ignoring function, the light source index is less than one
131
Ignoring function, the specified light source type is not available on the workstation
132
Ignoring function, the specified spot light spread angle is out of range
138
Ignoring function, one or more of the fields in the specified data record is inconsistent with the specified type

SEE ALSO

set light source state, set individual asf, inquire light source representation, inquire predefined light source representation, inquire light source facilities, inquire workstation state table length plus


Previous Next Up Title Contents Index Functions Index Top Library