public Tetrahedron(Point point1, Point point2, Point point3, Point point4, double mass, System.Drawing.Color color, double fresnel = .03, double roughness = .5)
        {
            if (mass <= 0 || double.IsNaN(mass) || double.IsInfinity(mass))
            {
                throw new ArgumentException("Mass must be a positive number!");
            }

            underlying = new Geometry.Geometry3D.Tetrahedron(point1, point2, point3, point4);
            Mass       = mass;
            Color      = color;

            if (CheckCoPlanar())
            {
                throw new ArgumentException("Tetrahedron must have noncoplanar points!");
            }
        }
Example #2
0
 /// <summary>
 /// Returns whether this tetrahedron has any volume of overlap with another
 /// </summary>
 public bool BulkOverlap(Tetrahedron other)
 {
     foreach (var point in Points)
     {
         if (other.LiesInside(point))
         {
             return(true);
         }
     }
     foreach (var point in other.Points)
     {
         if (LiesInside(point))
         {
             return(true);
         }
     }
     return(false);
 }