private void CreateMaterial()
 {
     this.material = new Material(this.Reflectiveness, this.UseTexture, this.Transparent, this.RefractionIndex, this.TextureFilePath);
     this.material.InterpolateNormals = this.InterpolateNormals;
     if (this.UseTexture)
     {
         RayTracerTexture texture = new RayTracerTexture(this.TextureFilePath);
         this.material.Texture = texture;
     }
 }
Example #2
0
 public Mesh(Triangle[] triangles, Material material, BoundingBox boundingBox)
 {
     this.Triangles = triangles;
     this.MeshMaterial = material;
     this.MeshBoundingBox = boundingBox;
 }