示例#1
0
        public Normal3 Sample(Random random)
        {
            ISphere sphere    = new UnitSphere(Position3.Origin);
            Normal3 direction = ((Direction3)sphere.SurfacePosition(random)).Normalized();

            return(IDirection3.InSameClosedHemisphere(Orientation, direction) ? direction : -direction);
        }
示例#2
0
 public bool Contains(Normal3 sample) => IDirection3.InSameClosedHemisphere(Orientation, sample);