/// <summary> /// Determines whether the specified <see cref="DIS.OpenDIS.Enumerations.Environment.ObjectState.ExhaustSmoke"/> instance is equal to this instance. /// </summary> /// <param name="other">The <see cref="DIS.OpenDIS.Enumerations.Environment.ObjectState.ExhaustSmoke"/> instance to compare with this instance.</param> /// <returns> /// <c>true</c> if the specified <see cref="DIS.OpenDIS.Enumerations.Environment.ObjectState.ExhaustSmoke"/> is equal to this instance; otherwise, <c>false</c>. /// </returns> public bool Equals(ExhaustSmoke other) { // If parameter is null return false (cast to object to prevent recursive loop!) if ((object)other == null) { return(false); } return (this.Opacity == other.Opacity && this.Attached == other.Attached && this.Chemical == other.Chemical); }
/// <summary> /// Creates the <see cref="DIS.OpenDIS.Enumerations.Environment.ObjectState.ExhaustSmoke"/> instance from the uint value. /// </summary> /// <param name="value">The uint value which represents the <see cref="DIS.OpenDIS.Enumerations.Environment.ObjectState.ExhaustSmoke"/> instance.</param> /// <returns>The <see cref="DIS.OpenDIS.Enumerations.Environment.ObjectState.ExhaustSmoke"/> instance, represented by the uint value.</returns> public static ExhaustSmoke FromUInt32(uint value) { ExhaustSmoke ps = new ExhaustSmoke(); uint mask0 = 0xff0000; byte shift0 = 16; uint newValue0 = (value & mask0) >> shift0; ps.Opacity = (byte)newValue0; uint mask1 = 0x1000000; byte shift1 = 24; uint newValue1 = (value & mask1) >> shift1; ps.Attached = (ExhaustSmoke.AttachedValue)newValue1; uint mask2 = 0x6000000; byte shift2 = 25; uint newValue2 = (value & mask2) >> shift2; ps.Chemical = (ExhaustSmoke.ChemicalValue)newValue2; return(ps); }