コード例 #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
ファイル: TangentSingle.cs プロジェクト: iniside/CryCIL
 /// <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
ファイル: TangentInt16.cs プロジェクト: iniside/CryCIL
 /// <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
ファイル: TangentSingle.cs プロジェクト: RoqueDeicide/CryCIL
 /// <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;
 }