Пример #1
0
 /// <summary>
 /// Transfers instance of type that implements <see cref="ITangent" /> 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, ITangent tangent)
 {
     if (tangent is TangentInt16)
     {
         ToNativeMemory(pointer, offset, (TangentInt16)tangent);
     }
     else if (tangent is TangentSingle)
     {
         ToNativeMemory(pointer, offset, (TangentSingle)tangent);
     }
 }
Пример #2
0
 public IVertex SetLocalTangent(ITangent localTangent)
 {
     this.LocalTangent = localTangent;
     return(this);
 }
Пример #3
0
 /// <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(ITangent other)
 {
     return(other is TangentSingle &&
            this.Tangent == ((TangentSingle)other).Tangent &&
            this.Binormal == ((TangentSingle)other).Binormal);
 }
Пример #4
0
 /// <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(ITangent other)
 {
     return(other is TangentInt16 &&
            this.Tangent == ((TangentInt16)other).Tangent &&
            this.Binormal == ((TangentInt16)other).Binormal);
 }
Пример #5
0
 /// <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(ITangent other)
 {
     return other is TangentSingle &&
         this.Tangent == ((TangentSingle)other).Tangent &&
         this.Binormal == ((TangentSingle)other).Binormal;
 }