Пример #1
0
 /// <summary>
 /// Get the normal for the polygon.
 /// May be optimized for PolyAdv.
 /// </summary>
 /// <param name="poly"></param>
 /// <returns></returns>
 public static Vector3 GetNormal(this IPoly poly)
 {
     if (poly is IPolyExtensionNormal)
     {
         return(((IPolyExtensionNormal)poly).AdvGetNormal());
     }
     else if (poly is IPolyForwarder)
     {
         return(((IPolyForwarder)poly).GetPoly().GetNormal());
     }
     else
     {
         return(poly.CalcNormal());
     }
 }