Setting Light Sources
Functions Introduced:
These functions retrieve and set the information associated with the specified window, respectively, using the ProLightInfo data structure. The data structure is defined as follows:
typedef struct pro_tk_light
{
wchar_t name[PRO_NAME_SIZE];
ProLightType type;
ProBoolean status; /* active or inactive */
double rgb[3]; /* for all types */
double position[3]; /* for point and spot */
double direction[3]; /* for direction and spot */
double spread_angle; /* for spot, in radian */
ProBoolean cast_shadows;
} ProLightInfo;
The Pro_light structure contains the following fields:
• name—Specifies the name of the light source.
• type—Specifies the light type—ambient, direction, point, or spot.
• status—Specifies whether the light source is active or inactive.
• rgb—Specifies the red, green, and blue values, regardless of the light type.
• position—Specifies the position of the light, for point and spot lights only.
• direction—Specifies the direction of the light, for direction and spot lights only.
• spread_angle—Specifies the angle the light is spread, for spot lights only.
• cast_shadows—Specifies whether the light casts shadows. This applies to Creo Render Studio only. Refer to the Creo Render Studio Help for more information on Creo Render Studio.