Class TPhongMaterialInfo
Unit
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.
Source: scene/x3d/x3dnodes_utils_materials.inc (line 88).
Hierarchy
- TObject
- TMaterialInfo
- TPhongMaterialInfo
Overview
Constants
| Public | DefaultTransparency = 0.0; |
| Public | DefaultAmbientColor: TVector3 = (X: 0.2; Y: 0.2; Z: 0.2); |
| Public | DefaultAmbientIntensity = 0.2; |
| Public | DefaultDiffuseColor: TVector3 = (X: 0.8; Y: 0.8; Z: 0.8); |
| Public | DefaultSpecularColor: TVector3 = (X: 0; Y: 0; Z: 0); |
| Public | DefaultEmissiveColor: TVector3 = (X: 0; Y: 0; Z: 0); |
| Public | DefaultShininess = 0.2; |
| Public | DefaultShininessExp = DefaultShininess * 128; |
| Public | DefaultReflectionColor: TVector3 = (X: 0; Y: 0; Z: 0); |
| Public | DefaultTransmissionColor: TVector3 = (X: 0; Y: 0; Z: 0); |
| Public | DefaultReflSpecularExp = 1000000; |
| Public | DefaultTransSpecularExp = 1000000; |
Methods
| Protected | function GetEmissiveColor: TVector3; virtual; abstract; |
| Protected | procedure SetEmissiveColor(const Value: TVector3); virtual; abstract; |
| Protected | function GetTransparency: Single; virtual; abstract; |
| Protected | procedure SetTransparency(const Value: Single); virtual; abstract; |
| Public | constructor Create(ANode: TX3DNode); |
| Public | function MainTexture( const Appearance: TAppearanceNode; const VRML1State: TVRML1State): TAbstractTextureNode; overload; virtual; abstract; |
| Public | function MainTexture( const Appearance: TAppearanceNode; const VRML1State: TVRML1State; const GeometryForTexCoord: TAbstractGeometryNode; out TexCoordIndex: Integer): TAbstractTextureNode; overload; virtual; abstract; |
| Protected | function GetDiffuseColor: TVector3; virtual; abstract; |
| Protected | procedure SetDiffuseColor(const Value: TVector3); virtual; abstract; |
| Protected | function GetSpecularColor: TVector3; virtual; abstract; |
| Protected | procedure SetSpecularColor(const Value: TVector3); virtual; abstract; |
| Protected | function GetMainColor: TVector3; override; |
| Protected | procedure SetMainColor(const Value: TVector3); override; |
| Public | function AmbientColor: TVector3; virtual; abstract; |
| Public | function PureEmissive: boolean; deprecated 'use TUnlitMaterialNode for unlit materials'; |
| Public | function Shininess: Single; virtual; abstract; |
| Public | function ShininessExp: Single; |
| Public | function ReflectionColor: TVector3; virtual; abstract; |
| Public | function TransmissionColor: TVector3; virtual; |
| Public | function ReflSpecular: TVector3; virtual; |
| Public | function ReflDiffuse: TVector3; virtual; |
| Public | function TransSpecular: TVector3; virtual; |
| Public | function TransDiffuse: TVector3; virtual; |
| Public | function ReflSpecularExp: Single; virtual; |
| Public | function TransSpecularExp: Single; virtual; |
Properties
| Public | property Node: TX3DNode read FNode; |
| Public | property Transparency: Single read GetTransparency write SetTransparency; |
| Public | property Opacity: Single read GetOpacity write SetOpacity; |
| Public | property MainColor: TVector3 read GetMainColor write SetMainColor; |
| Public | property EmissiveColor: TVector3 read GetEmissiveColor write SetEmissiveColor; |
| Public | property DiffuseColor: TVector3 read GetDiffuseColor write SetDiffuseColor; |
| Public | property SpecularColor: TVector3 read GetSpecularColor write SetSpecularColor; |
Description
Constants
| Public | DefaultTransparency = 0.0; |
|
This item is declared in ancestor TMaterialInfo. This item has no description. | |
| Public | DefaultAmbientColor: TVector3 = (X: 0.2; Y: 0.2; Z: 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 | |
| Public | DefaultAmbientIntensity = 0.2; |
|
This item has no description. | |
| Public | DefaultDiffuseColor: TVector3 = (X: 0.8; Y: 0.8; Z: 0.8); |
|
This item has no description. | |
| Public | DefaultSpecularColor: TVector3 = (X: 0; Y: 0; Z: 0); |
|
This item has no description. | |
| Public | DefaultEmissiveColor: TVector3 = (X: 0; Y: 0; Z: 0); |
|
This item has no description. | |
| Public | DefaultShininess = 0.2; |
|
This item has no description. | |
| Public | DefaultShininessExp = DefaultShininess * 128; |
|
This item has no description. | |
| Public | DefaultReflectionColor: TVector3 = (X: 0; Y: 0; Z: 0); |
|
This item has no description. | |
| Public | DefaultTransmissionColor: TVector3 = (X: 0; Y: 0; Z: 0); |
|
This item has no description. | |
| Public | DefaultReflSpecularExp = 1000000; |
|
This item has no description. | |
| Public | DefaultTransSpecularExp = 1000000; |
|
This item has no description. | |
Methods
| Protected | function GetEmissiveColor: TVector3; virtual; abstract; |
|
This item is declared in ancestor TMaterialInfo. This item has no description. | |
| Protected | procedure SetEmissiveColor(const Value: TVector3); virtual; abstract; |
|
This item is declared in ancestor TMaterialInfo. This item has no description. | |
| Protected | function GetTransparency: Single; virtual; abstract; |
|
This item is declared in ancestor TMaterialInfo. This item has no description. | |
| Protected | procedure SetTransparency(const Value: Single); virtual; abstract; |
|
This item is declared in ancestor TMaterialInfo. This item has no description. | |
| Public | constructor Create(ANode: TX3DNode); |
|
This item is declared in ancestor TMaterialInfo. This item has no description. | |
| Public | function MainTexture( const Appearance: TAppearanceNode; const VRML1State: TVRML1State): TAbstractTextureNode; overload; virtual; abstract; |
|
This item is declared in ancestor TMaterialInfo. Texture that determines the primary RGB color and transparency (opacity). See TX3DGraphTraverseState.MainTexture, which is really a shortcut to call this. | |
| Public | function MainTexture( const Appearance: TAppearanceNode; const VRML1State: TVRML1State; const GeometryForTexCoord: TAbstractGeometryNode; out TexCoordIndex: Integer): TAbstractTextureNode; overload; virtual; abstract; |
|
This item is declared in ancestor TMaterialInfo. This item has no description. | |
| Protected | function GetDiffuseColor: TVector3; virtual; abstract; |
|
This item has no description. | |
| Protected | procedure SetDiffuseColor(const Value: TVector3); virtual; abstract; |
|
This item has no description. | |
| Protected | function GetSpecularColor: TVector3; virtual; abstract; |
|
This item has no description. | |
| Protected | procedure SetSpecularColor(const Value: TVector3); virtual; abstract; |
|
This item has no description. | |
| Protected | function GetMainColor: TVector3; override; |
|
Main color of Phong material is DiffuseColor. | |
| Protected | procedure SetMainColor(const Value: TVector3); override; |
|
This item has no description. | |
| Public | function AmbientColor: TVector3; virtual; abstract; |
|
This item has no description. | |
| Public | function PureEmissive: boolean; deprecated 'use TUnlitMaterialNode for unlit materials'; |
|
Warning: this symbol is deprecated: use TUnlitMaterialNode for unlit materials 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. This way of achieving "something like unlit material" has issues, see https://github.com/michaliskambi/x3d-tests/wiki/Why-is-UnlitMaterial-useful . For this reason, we recommend to use (and detect, for optimization) the TUnlitMaterialNode instead of this "special case of Phong material". | |
| Public | function Shininess: Single; virtual; abstract; |
|
This item has no description. | |
| Public | 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). | |
| Public | function ReflectionColor: TVector3; virtual; abstract; |
|
This item has no description. | |
| Public | function TransmissionColor: TVector3; virtual; |
|
This item has no description. | |
| Public | function ReflSpecular: TVector3; virtual; |
|
Warning: this symbol is deprecated. Used by path-tracer. See https://castle-engine.io/x3d_extensions.php#section_ext_material_phong_brdf_fields . Not useful for normal CGE rendering. | |
| Public | function ReflDiffuse: TVector3; virtual; |
|
This item has no description. | |
| Public | function TransSpecular: TVector3; virtual; |
|
This item has no description. | |
| Public | function TransDiffuse: TVector3; virtual; |
|
This item has no description. | |
| Public | function ReflSpecularExp: Single; virtual; |
|
This item has no description. | |
| Public | function TransSpecularExp: Single; virtual; |
|
This item has no description. | |
Properties
| Public | property Node: TX3DNode read FNode; |
|
This item is declared in ancestor TMaterialInfo. Associated material node. | |
| Public | property Transparency: Single read GetTransparency write SetTransparency; |
|
This item is declared in ancestor TMaterialInfo. Transparency of the material determines how much is it "see-through". Value 0 (DefaultTransparency) means fully opaque, 1 means fully transparent. | |
| Public | property Opacity: Single read GetOpacity write SetOpacity; |
|
This item is declared in ancestor TMaterialInfo.
Opacity of the material, just | |
| Public | property MainColor: TVector3 read GetMainColor write SetMainColor; |
|
This item is declared in ancestor TMaterialInfo. Single color that is the best approximation of this material look. For Phong material, it's DiffuseColor. For unlit material, it's EmissiveColor. For physical material, it's BaseColor. This is useful for debug purposes, for example when we force everything to be unlit by Attributes.Lighting=false. It doesn't follow any X3D official equations, it's only for debugging. | |
| Public | property EmissiveColor: TVector3 read GetEmissiveColor write SetEmissiveColor; |
|
This item is declared in ancestor TMaterialInfo. Emissive color represents the color of the material that is not affected by any light sources. All material types (unlit, Phong, physical) have this color. | |
| Public | property DiffuseColor: TVector3 read GetDiffuseColor write SetDiffuseColor; |
|
This item has no description. | |
| Public | property SpecularColor: TVector3 read GetSpecularColor write SetSpecularColor; |
|
This item has no description. | |
Generated by PasDoc 0.17.0.snapshot.