Class SpotLightComponent
A light source that emits light within a directed cone.
In contrast to the PointLightComponent, this component only emits light within a cone shape. The main direction of the cone is along the owner's negative z-axis. Typical use cases for spotlights are flashlights. However, they can also be used to emulate the shadow of point lights that are encased in a hull.
class Microsoft::Azure::RemoteRendering::SpotLightComponent final : public Microsoft::Azure::RemoteRendering::LightComponentBase
Properties
AttenuationCutoff
Custom interval of min/max distances over which the light's attenuated intensity is scaled down to zero.
A Result.InvalidParam error occurs if the value is negative, NaN or infinite.
auto GetAttenuationCutoff() const noexcept -> Microsoft::Azure::RemoteRendering::Float2;
auto SetAttenuationCutoff(Microsoft::Azure::RemoteRendering::Float2 const& value) noexcept -> Microsoft::Azure::RemoteRendering::Status;
See also
FalloffExponent
The strength of the light falloff between the inner and outer cone angle.
The larger the value, the sharper the transition. The default value of 1.0 results in a linear transition.
A Result.InvalidParam error occurs if the value is outside the range [0.01; 256].
auto GetFalloffExponent() const noexcept -> float;
auto SetFalloffExponent(float value) noexcept -> Microsoft::Azure::RemoteRendering::Status;
Projected2dTexture
Optional 2D Texture to be projected onto geometry.
The color from the texture is used to modulate the light's color.
A Result.InvalidType error occurs if a texture is set that is not a 2D texture.
auto GetProjected2dTexture() const noexcept -> ApiHandle<Microsoft::Azure::RemoteRendering::Texture>;
auto SetProjected2dTexture(ApiHandle<Microsoft::Azure::RemoteRendering::Texture> const& value) noexcept -> Microsoft::Azure::RemoteRendering::Status;
Radius
The radius of the light emitting shape.
A Result.InvalidParam error occurs if the value is negative, NaN or infinite.
auto GetRadius() const noexcept -> float;
auto SetRadius(float value) noexcept -> Microsoft::Azure::RemoteRendering::Status;
See also
SpotAngleDeg
The inner and outer angle (in degree) of the spot light cone.
- Everything within the inner angle is illuminated with full brightness.
- Everything outside the outer angle won't be illuminated at all.
- Between the inner and outer angle a falloff that creates a penumbra-like effect is applied.
A Result.InvalidParam error occurs if x or y is outside the range [0; 89] or if x is >= y.
auto GetSpotAngleDeg() const noexcept -> Microsoft::Azure::RemoteRendering::Float2;
auto SetSpotAngleDeg(Microsoft::Azure::RemoteRendering::Float2 const& value) noexcept -> Microsoft::Azure::RemoteRendering::Status;