2using System.Collections.Generic;
27 : base(new
ScriptNode[] { Diffuse, Specular, Position },
56 Graphs3D.PhongLightSource[] LightSources;
59 if (!(
Arguments[0].AssociatedObjectValue is Graphs3D.PhongMaterial Material))
63 if (Obj is Graphs3D.PhongLightSource Source)
64 LightSources =
new Graphs3D.PhongLightSource[] { Source };
67 List<Graphs3D.PhongLightSource> Sources =
new List<Graphs3D.PhongLightSource>();
69 foreach (
IElement E
in V.VectorElements)
77 LightSources = Sources.ToArray();
82 return new ObjectValue(
new Graphs3D.PhongShader(Material, Ambient, LightSources));
Script runtime exception.
Class managing a script expression.
Generates a Graphs3D.PhongShader object.
override string[] DefaultArgumentNames
Default Argument names
PhongShader(ScriptNode Diffuse, ScriptNode Specular, ScriptNode Position, int Start, int Length, Expression Expression)
Generates a Graphs3D.PhongIntensity object.
override IElement Evaluate(IElement[] Arguments, Variables Variables)
Evaluates the function.
override string FunctionName
Name of the function
Contains information about the intensity of a light component, as used in the Phong reflection model....
Base class for multivariate funcions.
ScriptNode[] Arguments
Function arguments.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
Expression Expression
Expression of which the node is a part.
int Start
Start position in script expression.
Basic interface for all types of elements.
object AssociatedObjectValue
Associated object value.
Basic interface for vectors.
ArgumentType
Type of parameter used in a function definition or a lambda definition.