Exemplo n.º 1
0
 public PointLight(LightMaterial mt, Point pt)
     : base(mt)
 {
     float pdf;
     this.Position = pt;
     this.power = mt.GetEmittance(0f, 0f, out pdf);
 }
Exemplo n.º 2
0
        public TriangleMeshLight(LightMaterial mt, RayEngineScene scene, TriangleMeshInfo mesh) : base(mt)
        {
            this.scene = scene;
            this.mesh = mesh;
            this.rnd = new FastRandom();

            triangleSampleData = new TriangleSample[this.mesh.TrianglesCount];

            for (int i = mesh.StartTriangle, j = 0; i < mesh.EndTriangle; i++, j++)
            {
                triangleSampleData[j] = new TriangleSample(scene.Triangles[i].AreaV(scene.Vertices), NormalModifier * scene.Triangles[i].ComputeNormal(scene.Vertices));
            }

            triangleSampleData.PartialSort((a, b) => a.Item1.CompareTo(a.Item1), 0, triangleSampleData.Length);

        }
Exemplo n.º 3
0
 public BasicInfiniteLight(IEnvironmentMapSampler envMap, LightMaterial mt) : base(mt)
 {
     Sampler = envMap;
 }
Exemplo n.º 4
0
 public BasicInfiniteLight(RgbSpectrumTexture tx, RgbSpectrumTexture tx_l, LightMaterial mt) : base(mt)
 {
     Sampler = new LatLongMap(tx, tx_l);
 }
Exemplo n.º 5
0
 public BaseInfiniteLight(LightMaterial mt)
     : base(mt)
 {
 }
Exemplo n.º 6
0
 public LightsourceObject(BaseMaterial material, BaseLight light) : base(null)
 {
     this.Light = light;
     this.Material = (LightMaterial) material;
 }
Exemplo n.º 7
0
 protected BaseLight(LightMaterial mt)
 {
     Material = mt;
 }