Class TMaterialNode
Unit
X3DNodes
Declaration
type TMaterialNode = class(TAbstractMaterialNode)
Description
Surface material properties for associated geometry nodes, used by the lighting equations during rendering.
Hierarchy
Overview
Methods
Properties
Description
Methods
 |
procedure CreateNode; override; |
|
 |
destructor Destroy; override; |
|
 |
class function ClassX3DType: string; override; |
|
 |
class function URNMatching(const URN: string): boolean; override; |
|
 |
class function ForVRMLVersion(const Version: TX3DVersion): boolean; override; |
|
 |
function Opacity: Single; |
Opacity is just a 1 - FdTransparency.Value. Defined for your comfort — for OpenGL you will usually want to pass Opacity, not Transparency.
|
 |
function ShininessExp: Single; |
ShininessExp is just 128 * FdShininess.Value, this is the "real" exponent indicated by shininess field value. Defined for your comfort — for any graphic library you will usually want to pass the "real" exponent given by this function, not just value of shininess field.
|
 |
function MaterialInfo: TMaterialInfo; |
Material information based on this node. It is automatically updated when properties of this material change. Do not free it yourself, it will be automatically freed when this node is freed.
|
 |
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. It is similar to the NULL material situation (when "Appearance.material=NULL" case), but the color and transparency are still configurable (using FdEmissiveColor and FdTransparency fields).
We can optimize this case when rendering.
|
 |
procedure ForcePureEmissive; |
Force the material pure emissive (see PureEmissive) by setting other colors to black.
|
Properties
 |
property FdAmbientIntensity: TSFFloat read FFdAmbientIntensity; |
|
 |
property FdDiffuseColor: TSFColor read FFdDiffuseColor; |
|
 |
property FdEmissiveColor: TSFColor read FFdEmissiveColor; |
|
 |
property FdShininess: TSFFloat read FFdShininess; |
|
 |
property FdSpecularColor: TSFColor read FFdSpecularColor; |
|
 |
property FdTransparency: TSFFloat read FFdTransparency; |
|
 |
property FdFogImmune: TSFBool read FFdFogImmune; |
Make the object not affected by fog. This is a Castle Game Engine extension, not present in X3D standard.
|
 |
property FdMirror: TSFFloat read FFdMirror; |
Make the object a mirror. Right now used only by the classic ray-tracer, not by interactive renderer. This is a Castle Game Engine extension, not present in X3D standard.
|
 |
property FdReflSpecular: TMFColor read FFdReflSpecular; |
|
 |
property FdReflDiffuse: TMFColor read FFdReflDiffuse; |
|
 |
property FdTransSpecular: TMFColor read FFdTransSpecular; |
|
 |
property FdTransDiffuse: TMFColor read FFdTransDiffuse; |
|
 |
property FdReflSpecularExp: TSFFloat read FFdReflSpecularExp; |
|
 |
property FdTransSpecularExp: TSFFloat read FFdTransSpecularExp; |
|
 |
property AmbientIntensity: Single read GetAmbientIntensity write SetAmbientIntensity; |
|
 |
property DiffuseColor: TCastleColorRGB read GetDiffuseColor write SetDiffuseColor; |
|
 |
property EmissiveColor: TCastleColorRGB read GetEmissiveColor write SetEmissiveColor; |
|
 |
property Shininess: Single read GetShininess write SetShininess; |
|
 |
property SpecularColor: TCastleColorRGB read GetSpecularColor write SetSpecularColor; |
|
 |
property Transparency: Single read GetTransparency write SetTransparency; |
|
 |
property Mirror: Single read GetMirror write SetMirror; |
|
 |
property ReflSpecularExp: Single read GetReflSpecularExp write SetReflSpecularExp; |
|
 |
property TransSpecularExp: Single read GetTransSpecularExp write SetTransSpecularExp; |
|
Generated by PasDoc 0.15.0.
|