![]() |
![]() |
![]() |
![]() |
GDlight_xxxx
Synopsis
access a Graphics Display Kit light
void _ GDlight_get_type ( light_id , _int _* type _);
void _ GDlight_get_state ( light_id , _int _* state _);
void _ GDlight_get_color ( light_id , _float _* color _);
void _ GDlight_get_att ( light_id , _float _* att _);
void _ GDlight_get_concen ( light_id , _float _* concen _);
void _ GDlight_get_angle ( light_id , _float _* angle _);
OMobj_id _ light_id ;void _ GDlight_set_type ( light_id , _int _ type _);
void _ GDlight_set_state ( light_id , _int _ state _);
void _ GDlight_set_color ( light_id , _float _* color _);
void _ GDlight_set_att ( light_id , _float _* att _);
void _ GDlight_set_concen ( light_id , _float _ concen _);
void _ GDlight_set_angle ( light_id , _float _ angle _);
OMobj_id _ light_id ;void _ GDlight_attach_xform ( light_id , _ xform_id , int flag );
void _ GDlight_detach_xform ( light_id, int flag );
OMobj_id _ light_id , _ xform_id ;void _ GDlight_delete (
NULL,
OMobj_id _ light_id ,
0,
GDlight _* light _);void _ GDlight_reset (GDlight _* light );
Description
These routines are used to access the Graphics Display Kit light.
The GDlight_get_xxxx routines get the subobject values of the light. The GDlight_set_xxxx routines set the subobject values of a light. These routines are used by the Graphics Display Kit light editor (i.e., GDlight_edit).
GDlight_attach_xform attaches a transform to the light. If the light is already attached to a transform, the routine returns without changing the transform. GDlight_detach_xform detaches the transform from the light.
GDlight_delete deletes the light. This method is called directly by the Object Manager when a light is deleted.
GDlight_reset resets the light's subobjects to their default values. The default values are those in specified in DefaultLight
To create an instance of a light, call the utility routine GDcreate_instance.
Parameters
(GDlight_delete only) _The light object's local pointer. To get this value, call the utility routine GDget_local.
(GDlight_attach/detach_xforn only) This argument controls whether the routine actually attaches the transform to the light: 0 means no; 1 means yes. In normal usage within the Graphics Display Kit, the flag is set to 0. If you are using the routines programatically, set the flag to 1.
Example
/* Get and set a light object's angle subobject. */
OMobj_id light_id; /* Assume this has been set. */
float angle;
...
GDlight_get_angle(light_id, &angle);
angle *= 0.9;
GDlight_set_angle(light_id, angle);
![]() |
![]() |
![]() |
![]() |