Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
PhongLightSourceOutput.cs
1using System;
2using System.Text;
5
7{
12 {
18 public Grade Supports(Type Object) => Object == typeof(PhongLightSource) ? Grade.Ok : Grade.NotAtAll;
19
25 public string GetString(object Value)
26 {
27 PhongLightSource Source = (PhongLightSource)Value;
28 StringBuilder sb = new StringBuilder();
29
30 sb.Append("PhongLightSource(");
31 sb.Append(Expression.ToString(Source.Diffuse));
32 sb.Append(',');
33 sb.Append(Expression.ToString(Source.Specular));
34 sb.Append(',');
35 sb.Append(Expression.ToString(Source.Position));
36 sb.Append(')');
37
38 return sb.ToString();
39 }
40 }
41}
Class managing a script expression.
Definition: Expression.cs:39
static string ToString(double Value)
Converts a value to a string, that can be parsed as part of an expression.
Definition: Expression.cs:4496
Converts values of type PhongLightSource to expression strings.
Grade Supports(Type Object)
If the interface understands objects such as Object .
string GetString(object Value)
Gets a string representing a value.
Contains information about a light source, as used in the Phong reflection model. https://en....
Vector3 Position
Position of light source..
PhongIntensity Diffuse
Diffuse intensity.
PhongIntensity Specular
Specular intensity.
Interface for custom string output classes. Converts objects of a given type to an expression string.
Grade
Grade enumeration
Definition: Grade.cs:7