Пример #1
0
        public virtual Photon store(RGBColor power, Vector3D position, Vector3D direction, Vector3D surfaceNormal)
        {
            storedPhotons_++;

            Photon photon = new Photon();

            photon.precomputedIrradiance = false;

            photon.power    = new RGBColor(power);
            photon.position = new Vector3D(position);

            photon.number = storedPhotons_;

            photon.toSpherical(direction);
            photon.surfaceToSpherical(surfaceNormal);

            position.updateMinMax(bboxMin, bboxMax);

            photons.Add(photon);

            return(photon);
        }