| GraphicsHelperGetLightContribution Method |
Gets a factor that is an approximation of the perceived light contribution of the given
light falling on an object at the given world space position.
Namespace: DigitalRune.GraphicsAssembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax public static float GetLightContribution(
this LightNode lightNode,
Vector3F position,
float chromacityWeight
)
<ExtensionAttribute>
Public Shared Function GetLightContribution (
lightNode As LightNode,
position As Vector3F,
chromacityWeight As Single
) As Single
public:
[ExtensionAttribute]
static float GetLightContribution(
LightNode^ lightNode,
Vector3F position,
float chromacityWeight
)
[<ExtensionAttribute>]
static member GetLightContribution :
lightNode : LightNode *
position : Vector3F *
chromacityWeight : float32 -> float32
Parameters
- lightNode
- Type: DigitalRune.Graphics.SceneGraphLightNode
The light node. - position
- Type: DigitalRune.Mathematics.AlgebraVector3F
The position in world space. - chromacityWeight
- Type: SystemSingle
The weight that determines how important chromacity is compared to the uncolored light
intensity, ranging from 0 (not important) to 1 very important. Chromacity is the color bias
of a light. For example, 0.7 is a good value for this parameter.
Return Value
Type:
Single
A value that is proportional to the perceived contribution of the light. If the value is
high, then the light node is important for the scene.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
LightNode. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Exceptions Remarks
This method computes an approximation which can be use to sort lights by importance.
See Also