Castle Game EngineIntroduction Units Class Hierarchy Classes, Interfaces, Objects and Records Types Variables Constants Functions and Procedures Identifiers
|
Class TMaterialInfo
Unit
X3DNodes
Declaration
type TMaterialInfo = class(TObject)
Description
Material information, that abstracts various ways to define material properties. This hides differences between VRML 1.0 Material, X3D and VRML 2.0 Material and CommonSurfaceShader.
Hierarchy
Overview
Fields
 |
internal const DefaultAmbientColor: TVector3 = (Data: (0.2, 0.2, 0.2)); |
 |
internal const DefaultAmbientIntensity = 0.2; |
 |
internal const DefaultDiffuseColor: TVector3 = (Data: (0.8, 0.8, 0.8)); |
 |
internal const DefaultSpecularColor: TVector3 = (Data: (0, 0, 0)); |
 |
internal const DefaultEmissiveColor: TVector3 = (Data: (0, 0, 0)); |
 |
internal const DefaultShininess = 0.2; |
 |
internal const DefaultShininessExp = DefaultShininess * 128; |
 |
internal const DefaultTransparency = 0.0; |
 |
internal const DefaultReflectionColor: TVector3 = (Data: (0, 0, 0)); |
 |
internal const DefaultTransmissionColor: TVector3 = (Data: (0, 0, 0)); |
 |
internal const DefaultReflSpecularExp = 1000000; |
 |
internal const DefaultTransSpecularExp = 1000000; |
Methods
Properties
Description
Fields
 |
internal 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, the effective ambientColor for X3D is ambientIntensity * diffuseColor = (0.2 * 0.8, 0.2 * 0.8, 0.2 * 0.8) .
|
 |
internal const DefaultAmbientIntensity = 0.2; |
|
 |
internal const DefaultDiffuseColor: TVector3 = (Data: (0.8, 0.8, 0.8)); |
|
 |
internal const DefaultSpecularColor: TVector3 = (Data: (0, 0, 0)); |
|
 |
internal const DefaultEmissiveColor: TVector3 = (Data: (0, 0, 0)); |
|
 |
internal const DefaultShininess = 0.2; |
|
 |
internal const DefaultTransparency = 0.0; |
|
 |
internal const DefaultReflectionColor: TVector3 = (Data: (0, 0, 0)); |
|
 |
internal const DefaultTransmissionColor: TVector3 = (Data: (0, 0, 0)); |
|
 |
internal const DefaultReflSpecularExp = 1000000; |
|
 |
internal const DefaultTransSpecularExp = 1000000; |
|
Methods
 |
function AmbientColor: TVector3; virtual; abstract; |
|
 |
function DiffuseColor: TVector3; virtual; abstract; |
|
 |
function SpecularColor: TVector3; virtual; abstract; |
|
 |
function EmissiveColor: 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 Transparency: Single; virtual; abstract; |
|
 |
function Opacity: Single; |
Opacity is just 1 - Transparency .
|
 |
function ReflSpecular: TVector3; virtual; abstract; |
|
 |
function ReflDiffuse: TVector3; virtual; abstract; |
|
 |
function TransSpecular: TVector3; virtual; abstract; |
|
 |
function TransDiffuse: TVector3; virtual; abstract; |
|
 |
function ReflSpecularExp: Single; virtual; abstract; |
|
 |
function TransSpecularExp: Single; virtual; abstract; |
|
Properties
Generated by PasDoc 0.15.0.
|