Struct Attenuation
- Namespace
- OmegaEngine.Foundation.Light
- Assembly
- OmegaEngine.Foundation.dll
Factors describing the attenuation of light intensity over distance.
[TypeConverter(typeof(AttenuationConverter))]
public struct Attenuation : IEquatable<Attenuation>
- Implements
- Inherited Members
- Extension Methods
Constructors
Attenuation(float, float, float)
Creates a new attenuation structure
public Attenuation(float constant, float linear, float quadratic)
Parameters
constant
floatA constant factor multiplied with the color.
linear
floatA constant factor multiplied with the color and the inverse distance.
quadratic
floatA constant factor multiplied with the color and the inverse distance squared.
Fields
None
Value for no attenuation over distance.
public static readonly Attenuation None
Field Value
Properties
Constant
A constant factor multiplied with the color.
public float Constant { readonly get; set; }
Property Value
Linear
A constant factor multiplied with the color and the inverse distance.
public float Linear { readonly get; set; }
Property Value
Quadratic
A constant factor multiplied with the color and the inverse distance squared.
public float Quadratic { readonly get; set; }
Property Value
Methods
Equals(Attenuation)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Attenuation other)
Parameters
other
AttenuationAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(Attenuation, Attenuation)
public static bool operator ==(Attenuation left, Attenuation right)
Parameters
left
Attenuationright
Attenuation
Returns
explicit operator Vector4(Attenuation)
Convert Attenuation into SlimDX.Vector4
public static explicit operator Vector4(Attenuation attenuation)
Parameters
attenuation
Attenuation
Returns
- Vector4
explicit operator Attenuation(Vector4)
Convert SlimDX.Vector4 into Attenuation
public static explicit operator Attenuation(Vector4 vector)
Parameters
vector
Vector4
Returns
operator !=(Attenuation, Attenuation)
public static bool operator !=(Attenuation left, Attenuation right)
Parameters
left
Attenuationright
Attenuation