public void IntersectingShouldBeMatched(Matrix4x4 transform, Triangle triangle)
        {
            var plane = new PointDirection3(Vector3.Zero, Vector3.UnitX);

            var ttriangle = triangle.ApplyTransform(transform);
            var pplane = plane.ApplyTransform(transform);

            var intersectionO = ttriangle.IntersectPlane(pplane);

            intersectionO.IsSome.Should().Be(true);


        }
 public static Vector3 TriNorm(Triangle tri)
 {
     var v0 = tri.A - tri.B;
     var v1 = tri.A - tri.C;
     return Vector3.Cross(v0,v1);
 }
        public static Range3Single FromTriangle(Triangle triangle)
        {
            var xmin = double.MaxValue;
            var ymin = double.MaxValue;
            var zmin = double.MaxValue;

            var xmax = double.MinValue;
            var ymax = double.MinValue;
            var zmax = double.MinValue;

            Adjust(triangle.A, ref xmin, ref xmax, ref ymin, ref ymax, ref zmin, ref zmax);
            Adjust(triangle.B, ref xmin, ref xmax, ref ymin, ref ymax, ref zmin, ref zmax);
            Adjust(triangle.C, ref xmin, ref xmax, ref ymin, ref ymax, ref zmin, ref zmax);

            return new Range3Single(new Vector3(xmin,ymin,zmin), new Vector3(xmax, ymax, zmax));
            
        }