예제 #1
0
 public PointLight(LightMaterial mt, Point pt)
     : base(mt)
 {
     float pdf;
     this.Position = pt;
     this.power = mt.GetEmittance(0f, 0f, out pdf);
 }
예제 #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);

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