示例#1
0
        public Vector3D Sample()
        {
            Vector3D output;

            IntervalSampler sampler = m_sampler;

            output.X = sampler.Sample(out sampler);

            if (sampler != null)
            {
                output.Y = sampler.Sample(out sampler);
            }
            else
            {
                output.Y = MyUtils.GetRandomDouble(m_bBox.Min.Y, m_bBox.Max.Y);
            }

            if (sampler != null)
            {
                output.Z = sampler.Sample(out sampler);
            }
            else
            {
                output.Z = MyUtils.GetRandomDouble(m_bBox.Min.Z, m_bBox.Max.Z);
            }

            System.Diagnostics.Debug.Assert(sampler == null, "Inconsistency in MyBBSetSampler");

            return(output);
        }