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; }
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)); }
public MeshLight GetLight(TriangleMesh tr) { return this.lights.Where(item=>item is MeshLight).Cast<MeshLight>().LastOrDefault(item => item.MeshName.Equals(tr.MeshName, StringComparison.InvariantCultureIgnoreCase)); }