-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathPhongIntensity.cs
More file actions
57 lines (50 loc) · 1.41 KB
/
PhongIntensity.cs
File metadata and controls
57 lines (50 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System;
namespace Waher.Script.Graphs3D
{
/// <summary>
/// Contains information about the intensity of a light component, as used in the Phong reflection model.
/// https://en.wikipedia.org/wiki/Phong_reflection_model
/// </summary>
public class PhongIntensity
{
private readonly float red;
private readonly float green;
private readonly float blue;
private readonly float alpha;
/// <summary>
/// Contains information about the intensity of a light component, as used in the Phong reflection model.
/// https://en.wikipedia.org/wiki/Phong_reflection_model
/// </summary>
/// <param name="Red">Red intensity.</param>
/// <param name="Green">Green intensity.</param>
/// <param name="Blue">Blue intensity.</param>
/// <param name="Alpha">Alpha intensity.</param>
public PhongIntensity(float Red, float Green, float Blue, float Alpha)
{
this.red = Red;
this.green = Green;
this.blue = Blue;
this.alpha = Alpha;
}
/// <summary>
/// Red intensity.
/// </summary>
public float Red => this.red;
/// <summary>
/// Green intensity.
/// </summary>
public float Green => this.green;
/// <summary>
/// Blue intensity.
/// </summary>
public float Blue => this.blue;
/// <summary>
/// Alpha intensity.
/// </summary>
public float Alpha => this.alpha;
/// <summary>
/// If shader is 100% opaque.
/// </summary>
public bool Opaque => this.alpha >= 255;
}
}