Changes the parameters of the sun.
GSErrCode ACAPI_Environment ( APIEnv_ChangeSunSetsID, API_SunInfo *sunInfo, nullptr, nullptr );
Parameters
- sunInfo
- [in] Parameters of the sun.
Return Values
NoError
- The function has completed with success.
APIERR_BADPARS
sunInfo
isnullptr
.APIERR_NOPLAN
- No open project.
For other common API errors see the API Errors document.
Remarks
This function is used to change the parameters of the sunlight for photorendering. In order to retrieve the current sun settings call the APIEnv_GetSunSetsID environment function.
Example
API_SunInfo sunInfo; GSErrCode err; BNZeroMemory (&sunInfo, sizeof (API_SunInfo)); err = ACAPI_Environment (APIEnv_GetSunSetsID, &sunInfo, nullptr); if (err == NoError) { sunInfo.decayMode = API_SunDecay_High; /* set ackward fog for photorendering */ sunInfo.decayRGB.f_red = 0.90; sunInfo.decayRGB.f_green = 0.95; sunInfo.decayRGB.f_blue = 0.35; err = ACAPI_Environment (APIEnv_ChangeSunSetsID, &sunInfo, nullptr); }
Requirements
- Version: API 3.1 or later
- Header: APIdefs_Environment.h
See Also
API_SunInfo,
ACAPI_Environment, APIEnv_GetSunSetsID, API Functions