![]() |
![]() |
![]() |
![]() |
DefaultLight, DefaultLightOn
Synopsis
define a Graphics Display Kit light
group+OPort GDlight_templ {
enum+read type {
choices = {"Directional", "Point", "Spot", "BiDirectional"};
};
int state;
float col<animate=1>[3];
float att<animate=1>[2];
float concen<animate=1>;
float angle<animate=1>;
GDxform_templ+IPort2 &xform;
ptr+nonotify local_ptr<NEvisible=0>;
};GDlight_templ GDlight<NEsmallPixmapName="light.bmx",cxx_name="GDXlight"> {
local_ptr+write;
method+notify_inst+notify_val upd_func = "GDlight_update";
method+notify_deinst del_func = "GDlight_delete";
};GDlight _DefaultLight
{
type = GD_DEFAULT_LIGHT_TYPE;
state = 0;
col = {GD_DEFAULT_RED, GD_DEFAULT_GREEN, GD_DEFAULT_BLUE};
att = {GD_DEFAULT_ATTEN, GD_DEFAULT_ATTEN};
concen = GD_DEFAULT_CONCEN;
angle = GD_DEFAULT_ANGLE;
};GDlight DefaultLightOn {
type = GD_LIGHT_DIR;
state = 1;
col = { GD_DEFAULT_RED, GD_DEFAULT_GREEN, GD_DEFAULT_BLUE };
att = { GD_DEFAULT_ATTEN, GD_DEFAULT_ATTEN };
concen = GD_DEFAULT_CONCEN;
angle = GD_DEFAULT_ANGLE;
};Description
These templates define a Graphics Display Kit light. GDlight_templ defines the elements that cause the light's methods to execute. GDlight defines an instanceable version without default values. DefaultLight defines an instanceable version with default values. DefaultLightOn is like DefaultLight, except that the light source is enabled.
Input
A transformation that determines the light's orientation. xform is a connection to an element that matches type GDxform_templ.
Parameters
(Point lights and spot lights only) _This parameter controls the light's attenuation coefficients, specified as two numbers.
Output Port
Example
Libraries.Graphics_Display.Views.View3D
File
See also related modules
![]() |
![]() |
![]() |
![]() |