Struct ColorCorrection
- Namespace
- OmegaEngine.Foundation.Light
- Assembly
- OmegaEngine.Foundation.dll
Color correction values for use in post-processing.
[TypeConverter(typeof(ColorCorrectionConverter))]
public struct ColorCorrection : IEquatable<ColorCorrection>
- Implements
- Inherited Members
- Extension Methods
Constructors
ColorCorrection(float, float, float, float)
Creates a new color correction structure.
public ColorCorrection(float brightness = 1, float contrast = 1, float saturation = 1, float hue = 0)
Parameters
brightnessfloatHow bright the picture should be - values between 0 (black) and 5 (5x normal).
contrastfloatThe contrast level of the picture - values between -5 and 5.
saturationfloatThe color saturation level of the picture - values between -5 and 5.
huefloatThe color hue rotation of the picture - values between 0 and 360.
Fields
Default
No color change.
public static readonly ColorCorrection Default
Field Value
Properties
Brightness
How bright the picture should be - values between 0 (black) and 5 (5x normal).
public float Brightness { readonly get; set; }
Property Value
Contrast
The contrast level of the picture - values between -5 and 5.
public float Contrast { readonly get; set; }
Property Value
Hue
The color hue rotation of the picture - values between 0 and 360.
public float Hue { readonly get; set; }
Property Value
Saturation
The color saturation level of the picture - values between -5 and 5.
public float Saturation { readonly get; set; }
Property Value
Methods
Equals(ColorCorrection)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(ColorCorrection other)
Parameters
otherColorCorrectionAn 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
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override readonly int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
SinusInterpolate(float, params ColorCorrection[])
Performs smooth (sinus-based) interpolation between two or more value sets.
[Pure]
public static ColorCorrection SinusInterpolate(float factor, params ColorCorrection[] values)
Parameters
factorfloatA factor between 0 and
values.Length.valuesColorCorrection[]The value checkpoints.
Returns
ToString()
Returns the fully qualified type name of this instance.
public override readonly string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(ColorCorrection, ColorCorrection)
public static bool operator ==(ColorCorrection left, ColorCorrection right)
Parameters
leftColorCorrectionrightColorCorrection
Returns
explicit operator Vector4(ColorCorrection)
Convert ColorCorrection into SlimDX.Vector4
public static explicit operator Vector4(ColorCorrection correction)
Parameters
correctionColorCorrection
Returns
- Vector4
explicit operator ColorCorrection(Vector4)
Convert SlimDX.Vector4 into see ColorCorrection
public static explicit operator ColorCorrection(Vector4 vector)
Parameters
vectorVector4
Returns
operator !=(ColorCorrection, ColorCorrection)
public static bool operator !=(ColorCorrection left, ColorCorrection right)
Parameters
leftColorCorrectionrightColorCorrection