Ejemplo n.º 1
0
 public Triangle(int p, int p_2, int p_3) {
     this.v0 = (uint)p - delta;
     this.v1 = (uint)p_2 - delta;
     this.v2 = (uint)p_3 - delta;
     this.Owner = null;
     this.Index = -1;
     e1 = e2 = Vector.Zero;
     edgesInitialized = false;
 }
Ejemplo n.º 2
0
        public MeshLight(TriangleMesh m, RgbSpectrum gain = new RgbSpectrum())
        {
            this.mesh = m;
            this.MeshName = mesh.MeshName;
            this.gain = gain;
            this.LightName = this.MeshName;
            meshArea = this.mesh.triangles.Sum(item => item.AreaV(ref mesh.scene.Vertices));

        }
Ejemplo n.º 3
0
 public MeshLight GetLight(TriangleMesh tr)
 {
     return this.lights.Where(item=>item is MeshLight).Cast<MeshLight>().LastOrDefault(item => item.MeshName.Equals(tr.MeshName, StringComparison.InvariantCultureIgnoreCase));
 }