LightType.SetInitialIntensity
Method
Description:
Replace the current initial intensity object with the given object
Replace the current initial intensity object with the given object
Remarks:
The argument object is cloned
The argument object is cloned
Examples
public void SetInitialIntensityProperty(LightType lightType)
{
InitialIntensity initialIntensity = lightType.GetInitialIntensity();
if (initialIntensity is InitialFluxIntensity)
{
InitialFluxIntensity fluxIntensity = initialIntensity as InitialFluxIntensity;
double fluxValue = fluxIntensity.Flux;
// Set new value for Flux proeprty and set modified InitialIntensity to LightType.
fluxIntensity.Flux = 34.50;
lightType.SetInitialIntensity(fluxIntensity);
// Create a InitialWattageIntensity and set it to LightType.
InitialWattageIntensity wattageIntensity = new InitialWattageIntensity(25.57, 130.89);
lightType.SetInitialIntensity(wattageIntensity);
}
}
Parameters
| Parameter | Type | Description |
|---|---|---|
| initialIntensity | InitialIntensity | An object derived from an InitialIntensity object |
Return Value
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | A non-optional argument was null |