IG_vect_view_set_ambient_color
This function sets the ambient color for the view.
Declaration:
|
Copy Code
|
AT_ERRCOUNT ACCUAPI IG_vect_view_set_ambient_color(
HIG_VECT_VIEW hView,
float* lpAmbientColor
);
|
Arguments:
Name |
Type |
Description |
hView |
HIG_VECT_VIEW |
Handle to the view. |
lpAmbientColor |
float* |
Array of 4 floats that contain red, green, blue, and alpha components of the ambient color. |
Return Value:
Returns 0 if successful. Otherwise, returns the number of ImageGear errors that occurred during this function call.
Supported Raster Image Formats:
This function does not process image pixels.
Sample:
Vector
Remarks:
Ambient light has neither direction nor position, so it is fully defined by its color. Ambient light of the View is added to the lighting produced by light sources. In the absence of light sources, the model is lighted only by the ambient light of the View.
Ambient color has effect only if lighting is enabled for the view (see IG_vect_view_lighting_enable).
The usual range of red, green, and blue components is 0.0 ... 1.0, however, greater values are not prohibited. The alpha component must be in the range of 0.0 ... 1.0.