Class TPhongMaterialInfo
Unit
X3DNodes
Declaration
type TPhongMaterialInfo = class(TMaterialInfo)
Description
Material information that defines parameters for Phong lighting equations. This hides differences between various material nodes, like TMaterialNode and TCommonSurfaceShaderNode.
Hierarchy
Overview
Fields
 |
nested const DefaultAmbientColor: TVector3 = (Data: (0.2, 0.2, 0.2)); |
 |
nested const DefaultAmbientIntensity = 0.2; |
 |
nested const DefaultDiffuseColor: TVector3 = (Data: (0.8, 0.8, 0.8)); |
 |
nested const DefaultSpecularColor: TVector3 = (Data: (0, 0, 0)); |
 |
nested const DefaultEmissiveColor: TVector3 = (Data: (0, 0, 0)); |
 |
nested const DefaultShininess = 0.2; |
 |
nested const DefaultShininessExp = DefaultShininess * 128; |
 |
nested const DefaultReflectionColor: TVector3 = (Data: (0, 0, 0)); |
 |
nested const DefaultTransmissionColor: TVector3 = (Data: (0, 0, 0)); |
 |
nested const DefaultReflSpecularExp = 1000000; |
 |
nested const DefaultTransSpecularExp = 1000000; |
Methods
Properties
Description
Fields
 |
nested const DefaultAmbientColor: TVector3 = (Data: (0.2, 0.2, 0.2)); |
|
Default material parameters.
They luckily match between all the material-like nodes:
The AmbientColor is an exception. In X3D the effective AmbientColor is an AmbientIntensity * DiffuseColor, thus it has a default value of DefaultAmbientIntensity * DefaultiffuseColor = (0.2 * 0.8, 0.2 * 0.8, 0.2 * 0.8).
|
 |
nested const DefaultAmbientIntensity = 0.2; |
|
|
 |
nested const DefaultDiffuseColor: TVector3 = (Data: (0.8, 0.8, 0.8)); |
|
|
 |
nested const DefaultSpecularColor: TVector3 = (Data: (0, 0, 0)); |
|
|
 |
nested const DefaultEmissiveColor: TVector3 = (Data: (0, 0, 0)); |
|
|
 |
nested const DefaultShininess = 0.2; |
|
|
 |
nested const DefaultReflectionColor: TVector3 = (Data: (0, 0, 0)); |
|
|
 |
nested const DefaultTransmissionColor: TVector3 = (Data: (0, 0, 0)); |
|
|
 |
nested const DefaultReflSpecularExp = 1000000; |
|
|
 |
nested const DefaultTransSpecularExp = 1000000; |
|
|
Methods
 |
function GetDiffuseColor: TVector3; virtual; abstract; |
|
|
 |
procedure SetDiffuseColor(const Value: TVector3); virtual; abstract; |
|
|
 |
function GetSpecularColor: TVector3; virtual; abstract; |
|
|
 |
procedure SetSpecularColor(const Value: TVector3); virtual; abstract; |
|
|
 |
function AmbientColor: TVector3; virtual; abstract; |
|
|
 |
function PureEmissive: boolean; |
|
Only the emissiveColor is not black (zero), which means that the material behaves like unlit.
This checks that ambient and diffuse and specular colors are all zero. It's an important information about the material sometimes. We can optimize this case when rendering.
|
 |
function Shininess: Single; virtual; abstract; |
|
|
 |
function ShininessExp: Single; |
|
Shininess exponent for Phong lighting equations.
Remember that the X3D Shininess field is "normalized", which means that it has to be multiplied by 128.0 to get actual exponent for lighting equations. This function returns the real exponent (already multiplied by 128.0, if necessary).
|
 |
function ReflectionColor: TVector3; virtual; abstract; |
|
|
 |
function TransmissionColor: TVector3; virtual; |
|
|
 |
function ReflDiffuse: TVector3; virtual; |
|
|
 |
function TransSpecular: TVector3; virtual; |
|
|
 |
function TransDiffuse: TVector3; virtual; |
|
|
 |
function ReflSpecularExp: Single; virtual; |
|
|
 |
function TransSpecularExp: Single; virtual; |
|
|
Properties
Generated by PasDoc 0.16.0.