/// <summary> /// Transfers instance of type that implements <see cref="IQTangent" /> interface to native memory. /// </summary> /// <param name="pointer"> /// Pointer to the beginning of the memory block that will contain the normal. /// </param> /// <param name="offset"> Byte offset that is added to the <paramref name="pointer" />. </param> /// <param name="tangent"> Object to transfer. </param> public static void ToNativeMemory(IntPtr pointer, int offset, IQTangent tangent) { if (tangent is QTangentInt16) { ToNativeMemory(pointer, offset, (QTangentInt16)tangent); } else if (tangent is QTangentSingle) { ToNativeMemory(pointer, offset, (QTangentSingle)tangent); } }
/// <summary> /// Indicates whether this tangent space normal is equal to another. /// </summary> /// <param name="other"> Another tangent. </param> /// <returns> /// True, if another normal uses <see cref="Single" /> type for coordinates and is equal to /// this one. /// </returns> public bool Equals(IQTangent other) { return(other is QTangentSingle && this.TangentBinormal == ((QTangentSingle)other).TangentBinormal); }
/// <summary> /// Indicates whether this tangent space normal is equal to another. /// </summary> /// <param name="other"> Another tangent. </param> /// <returns> /// True, if another normal uses <see cref="Int16" /> type for coordinates and is equal to /// this one. /// </returns> public bool Equals(IQTangent other) { return(other is QTangentInt16 && this.TangentBinormal == ((QTangentInt16)other).TangentBinormal); }
/// <summary> /// Indicates whether this tangent space normal is equal to another. /// </summary> /// <param name="other"> Another tangent. </param> /// <returns> /// True, if another normal uses <see cref="Single" /> type for coordinates and is equal to /// this one. /// </returns> public bool Equals(IQTangent other) { return other is QTangentSingle && this.TangentBinormal == ((QTangentSingle)other).TangentBinormal; }