Table of Contents

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 float

A constant factor multiplied with the color.

linear float

A constant factor multiplied with the color and the inverse distance.

quadratic float

A 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

Attenuation

Properties

Constant

A constant factor multiplied with the color.

public float Constant { readonly get; set; }

Property Value

float

Linear

A constant factor multiplied with the color and the inverse distance.

public float Linear { readonly get; set; }

Property Value

float

Quadratic

A constant factor multiplied with the color and the inverse distance squared.

public float Quadratic { readonly get; set; }

Property Value

float

Methods

Equals(Attenuation)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Attenuation other)

Parameters

other Attenuation

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The 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 Attenuation
right Attenuation

Returns

bool

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

Attenuation

operator !=(Attenuation, Attenuation)

public static bool operator !=(Attenuation left, Attenuation right)

Parameters

left Attenuation
right Attenuation

Returns

bool